0

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!

Maxime
  • 43
  • 6

1 Answers1

1

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.

Stanley Gong
  • 11,522
  • 1
  • 8
  • 16
  • That's pretty nice, thanks! the only problem is that translation_continuous() exemple use a file. But it's seem possible to replace the filename by a stream. Like this: `stream = speechsdk.audio.PushAudioInputStream()` `audio_config = speechsdk.audio.AudioConfig(stream=stream)` I don't have any error, but i write the stream and recive no answer. But that may be an orther problem – Maxime Dec 16 '20 at 19:56
  • 1
    @Maxime, if my answer is helpful, could you please click on the checkmark beside the answer to toggle it from greyed out to fill in to accept it, so that it will help others and close this query : ) If you have other questions , just post another question and let me know the link, I'll assist you ASAP – Stanley Gong Dec 17 '20 at 01:34
  • Thanks @Stanley ,as you suggested, i have open a new thread with my question, any suggestion would be greatly appreciated! https://stackoverflow.com/questions/65586642/translate-audio-from-speaker-output-in-python-with-azuresdk – Maxime Jan 05 '21 at 21:17