Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

grpc streaming error in sample app #7

Closed
hadfield opened this issue Jun 2, 2016 · 13 comments
Closed

grpc streaming error in sample app #7

hadfield opened this issue Jun 2, 2016 · 13 comments

Comments

@hadfield
Copy link

hadfield commented Jun 2, 2016

the ios streaming sample app now returns this error after about a second of audio processing:
{
error {
code: 10
message: "Audio data is being streamed too fast. Please stream audio data approximately at real time."
}
}

@hadfield
Copy link
Author

hadfield commented Jun 2, 2016

@timburks
Copy link
Contributor

timburks commented Jun 2, 2016

Marc, thank you. I've filed a bug report with the speech API team on this.

@hadfield
Copy link
Author

hadfield commented Jun 2, 2016

thanks!

@timburks
Copy link
Contributor

timburks commented Jun 6, 2016

Marc, what device are you using to test this? I'm unable to reproduce the problem with an iPhone 6s Plus.

@hadfield
Copy link
Author

hadfield commented Jun 6, 2016

this is in xcode, emulating iphone 6s. also, many others have reported the problem in the forum.

@timburks
Copy link
Contributor

timburks commented Jun 6, 2016

Thanks, I see it now in the simulator. The error is inconsistent but frequent. I seem to get better results when I set the sample rate to 8kHz. Currently that requires changes in two places...
AudioController.m:
sampleRate = 16000;
and SpeechRecognitionService.m:
initialRecognizeRequest.sampleRate = 16000;
The Speech API team is investigating this now.

@hadfield
Copy link
Author

hadfield commented Jun 6, 2016

changing the sample rate to alternate values has no effect on my end.
also, errors occur nearly always and immediately.

@timburks
Copy link
Contributor

timburks commented Jun 7, 2016

We're still investigating this, but I seem to get better results when I reduce the size of audio chunks that we send to the service. If you could try this, you'd find the related code in ViewController.m:

if ([self.audioData length] > 16384) {

If you replace 16384 with 0, audio chunks will be sent as soon as they are received from the audio unit, and at least in my tests, recognition runs without errors.

@hadfield
Copy link
Author

hadfield commented Jun 7, 2016

so far that works locally within xcode for me simulating iphone 6s.

@emiled
Copy link

emiled commented Jun 7, 2016

I'm experiencing the same issue, and have had some results when altering the sample rate, and the audioData length variable.

However the results have been inconsistent and i'm currently still experiencing the error.

@timburks
Copy link
Contributor

We believe this has been fixed.

@timburks timburks closed this as completed Aug 4, 2016
@korovkin
Copy link

i am experiencing the same issue

@korovkin
Copy link

we are streaming AMR data at 8Khz, our buffer size is about 256 bytes per write request.

please help debug.

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

No branches or pull requests

4 participants