I need a client library to connect to Bing's SpeechToText service using the websocket protocol as specified here: [login to view URL]
This library should implement the attached interface and be written on C#. It should use [login to view URL] and should work on latest versions of Xamarin.
From the attached interface file, the library should provide:
- A configuration method using the provided SstConfiguration class from the same file, to provide Bing Cognitive services subscription key, the sample bitrate to be used and a flag to indicate if bing should detect if the user has stopped talking.
- A method to start listening. A stream is going to be provided with a WAV file. This is going to be obtained from a live microphone, so only straigt forward reading operations are going to be allowed. The format for the audio stream is going to ve WAV, mono channel. The bitrate is going to be obtained from the SstConfiguration class.
- Methods for setting listeners for intermediate results, final results and errors.
- A method for manual stop.
- A method for cancel.
When integrated, the flow should be:
5) StartListening( audio stream )
The library should trigger intermediate callbacks as it receives them from the BingSpeech endpoint.
Either if the user finished talking or a call to "StopListening" is done, a new callback for the FinalListener should be done.
If at any time the user calls Cancel, all resources should be relelased and threads finished.
All source code has to be provided, which has to be written in C# and in English with proper code documentation.
For the solution to be valid, I would require you to provide the code in a Console App (.NET Core) project, that would simulate a microphone by reading a WAV file and stream it into the API.