简体   繁体   中英

Translate in python using Azure speech, directly from stream

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://docs.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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM