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

iOS: Use of this plugin prevents audio output from speech synthesis. #112

Open
wifisher opened this issue May 31, 2018 · 0 comments
Open

Comments

@wifisher
Copy link

I attempted to use this plugin with SpeechSynthesis on iOS. Speech synthesis works until the first attempt at speech recognition. From there on, speech synthesis fails.

I believe that the issue is related to the audio session category used by this plugin. The original category used is AVAudioSessionCategoryRecord. However, I believe that AVAudioSessionCategoryPlayAndRecord is required for an app to do both audio input and output.

I will submit a fix to this in a pull request. By default, the plugin will continue to use AVAudioSessionCategoryRecord to maintain the existing functionality. However, the addition of the following preference in config.xml will inform the plugin to use AVAudioSessionCategoryPlayAndRecord instead.

<preference name="speechRecognitionAllowAudioOutput" value="true" />

This code change allows my test app to be able to do both speech synthesis and recognition.

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

1 participant