bingspeechapi.md 2.64 KB

Bing Speech API

Step by step Guide.

Requirements

  • Valid Credit Card
    • Service can be used for free! But you need to deposit a payment method.

Microsoft Azure

Registration

  • Create new Azure Account

Azure Registration

  • Deposit a Payment Method - e.g. Credit Card
    • You will receive 170 Euro welcome bonus for the first month. (You have to spend that in this month)
  • Log-In with your new Account

Subscription plan

  • You have two options:
    1. Use your free trial subscription (ends after 30 days)
      • Go back to Azure Dashboard
2. Create a new subscription (recommended)

    - Create new subscription for user-based payment

    ![Billing Menu](img/bing/billing-menu.png)

    - Click on that ![Manage Button](img/bing/manage-btn.png) button    
    - Create new subscription for user-based payment
    - Go back to Azure Dashboard

Bing Speech Service

  • Create a new Bing Speech Service (initialization might take a while)

    • Choose your subscription plan
    • Choose your pricing plan (here you should choose the F0 - free tier - for 5k calls in a month)

Create Service

  • Go back to Azure Dashboard and click on your new Service
  • The secret keys and your subscription id is necessary for your authentication. You have to copy & paste them to your config.properties

Bing Speech Service

Bing Connector

  • For Text to Speech and Speech to Text requests.
public class BingConnector implements MessageListener {

    private void generateAccesToken(){}

    private void sendSpeechToTextRequest(final BotMessage botMessage){}

    private void sendTextToSpeechRequest(final BotMessage botMessage){}
}
  • AccessToken is required to successfully send parsing-request. Token generates from secret-keys mentioned above.
  • AccessToken decays after 10 mins. You need to refresh the Token.

Important: Speech to Text REST requests need to have Transfer-Endcoding: chunked Header!

Used online sources