To call Azure Marketplace Translation (and Speech) service

Dependencies:   EthernetInterface-FRDM HTTPClient-SSL R_BSP SDFileSystem TLV320_RBSP USBHost mbed-rtos mbed-src

The program calls Azure Marketplace Translation (and Speech) service.

How to use - Create an account for Microsoft Azure Marketplace - Get client ID and client secret. - Change client ID and client secret in main.cpp

The program was created based on the following libraries.

CodePlex Text-To-Speech with Microsoft Translator Service

MBED HTTPClient-SSL Library




File content as of revision 0:40a09c55e5be:

//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//  Copyright (c) Microsoft Corporation.  All rights reserved.
//  Portions Copyright (c) Kentaro Sekimoto All rights reserved.
//  Based on Text-To-Speech for .NET Micro Framework with Microsoft 
//  Translator Service

#include "mbed.h"

class AdmAuthentication
    AdmAuthentication(char *clientID, char *clientSecret);
    char *GetAccessToken();
    char *HttpPost(char *DatamarketAccessUri, char *requestDetails);
    char *id;
    char *secret;
    char encoded_id[64];
    char encoded_secret[64];
    char request[256];
    char token[1024];
    char url[128];