googlesamples / assistant-sdk-python

Samples and bindings for the Google Assistant API
http://developer.google.com/assistant/sdk
Apache License 2.0
915 stars 321 forks source link

broadcast audio file #350

Open mduzgun opened 5 years ago

mduzgun commented 5 years ago

I want to send audio file to my physical google home mini device, so I try to use broadcast feature. When I give audio data, if there is silence in audio data, I don't send audio after silence. Only starting part can be sent. I want to send whole sound. My main purpose is to send the audio file to google home device remotely. How to configure silence timeout for audio command? Or is there another way?

Fleker commented 5 years ago

Are you using the library or the service api?

mduzgun commented 5 years ago

I use assistant-sdk-python only. For example, I record voice file as "Broadcast one two three (silence) four five six" then give this audio file as input file to pushtotalk service, Google home mini broadcasts that only "one two three". How to broadcast whole audio file to Google home mini?

Fleker commented 5 years ago

If you're doing pushtotalk, you may see that by default it uses silence detection to determine when to end the API request. It stops recording when it gets the END_OF_UTTERANCE event. If you want, you should be able to change the logic so that you control when recording stops.

mduzgun commented 5 years ago

when it gets END_OF_UTTERANCE, server doesn't process audio and stops. Is there any way increase of time of silence detection? Or how to send audio file google home mini device using sdk?