-
-
Notifications
You must be signed in to change notification settings - Fork 94
Description
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.