Skip to content

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

@wifisher

Description

@wifisher

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions