Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can i set silence duration at end of speech ? #131

Closed
yeshunping opened this issue Dec 30, 2018 · 5 comments
Closed

Can i set silence duration at end of speech ? #131

yeshunping opened this issue Dec 30, 2018 · 5 comments

Comments

@yeshunping
Copy link

It seems that the default silence duration is 2s , it means that after 2 second silence, silence detected will be triggered. BUT on some cases, we need a shorter threshold for it, for example , 1s or 600ms for it.
I will C++ SDK ,but i failed to find a interface to set it. I only found that

InitialSilenceTimeout = 2

for NoMatchCode

Is there such a interface ? or if this feature will be supported in the coming release ? or existed already in SDK of other languages ?

@yeshunping
Copy link
Author

or is there some config for EndSilenceTimeout ?

@zhouwangzw
Copy link
Contributor

Currently it is not directly possible to specify silence timeout via SDK APIs. As a workaround, you can use FromEndpoint call to create a SpeechConfig and specifying the endping URL with query parameters:
wss://YourServiceRegion.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1? initialSilenceTimeoutMs=2000&endSilenceTimeoutMs=2000

Please note to replace YourServiceRegion with the name of service region associated with your subscription key, like westus. And the value for initialSilenceTimeoutMs and endSilenceTimeoutMs is in millisecond.

We will add methods in API to allow users to configure initial and end silence timeout in the future release.

@yeshunping
Copy link
Author

ok ,I will try SpeechConfig. thanks very much.

@wolfma61 wolfma61 closed this as completed Jan 7, 2019
@nansravn
Copy link

nansravn commented Jul 2, 2019

@zhouwangzw Any update regarding the silence timeout via SDK APIs? Is that already available?

@wolfma61
Copy link
Contributor

wolfma61 commented Jul 3, 2019

There is a 'SetProperty' method on the config which was added to the SDK to allow you to set parameters to the request
(in C#: https://docs.microsoft.com/en-us/dotnet/api/microsoft.cognitiveservices.speech.propertycollection.setproperty?view=azure-dotnet)

This way you can set the EndSilenceTimeout (PropertyIDs in C#:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.cognitiveservices.speech.propertyid?view=azure-dotnet)

thx
Wolfgang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants