In this video, provision the Bing Speech API in Azure portal and update your project with the keys.
- Next let's talk about the Bing Speech API. The Bing Speech API allows you to do two things. It allows you to converge speech to text and text to speech. And before I talk about the details of the API, let's set up our project. So what I did is that I went into exercise files chapter one, the fourth folder and picked the end code, unzipped it, and basically opened it in VS code and ran NPM install.
You should see a folder called node modules and the starting point of this particular chapter is the code that we ended with in the fourth video of the first chapter. Okay, so with this much in place, now let's go ahead and register in Azure for ourselves the Bing Speech API so we can actually start using it in our code. So go to Azure.com, go to portal.
You may have to sign in at this point, I've already signed in, and choose to create a resource. And I'm going to type Bing Speech API. Choose to create it. So I'm going to call this my Bing Speech API. I'll pick the free tier as usual, and put it in an existing resource group that I have and click on the create button.
Once this is created, I go to the resource, go to the overview link, and as usual, I'm going to copy some things from this particular area. So I'll copy this endpoint, just like before. This is the aught endpoint, so I'll come in here, go to config.ts and here, just like before, I'm going to create a node called speech, Another node in here called Bing Speech, authEndpoint will be this.
Let's make a little space here. And let's create a space for the two keys that Azure portal gives us, so click on show access keys and copy the first key. Again, your key will be different from mine, so make sure you use yours, my key won't work because I would have deleted it by now. And let's go ahead and copy the second key as well. Copy the second key, and let's also create the actual endpoint that we will be calling for speech to text, which is speech.platform.bing.com/speech/recognition /interactive/cognitiveservices/v1? language=en-us&format=detailed Okay, so with our configuration set up now it is time that we can go to the index.ts file, remove this console.log and now we can start writing some code that allows us to target the Bing Speech API
- Using the Translate Text API
- Getting supported languages
- Writing code to translate between languages
- Performing text to speech
- Setting up speech to text
- Writing code for speaker identification