Translate in python using Azure speech, directly from stream

678 views Asked by At

I am looking for a function in the speech sdk and some exemple, who would let me translate from Azure speech a live stream comming from an other source than the mic. So far, i've found two solution who doesn't exactly my needs

This one, translate live stream, but seem to use the default mic.

https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-speech-translation?tabs=script%2Cwindowsinstall&pivots=programming-language-python

I've also found this solution, using speech_recognition_with_push_stream()., witch is close, but doesn't seem to translate.only speech to text: Azure Speech SDK Speech to text from stream using python

Thanks for your help!

1

There are 1 answers

3
Stanley Gong On BEST ANSWER

Sample function:translation_continuous() in this official doc line 113 could be helpful for you to perform a continuous translate work.recognizer will open a session to handle streams from sources.