Open mazo20 opened 5 years ago
This is because the plugin sets the audioSession category to "record":
and this doesn't allow audio playback, which is why you hear nothing.
Two options to fix this: 1) After speech recognition is invoked, manually set the category to playback in your text-to-speech code. 2) Fork the speech_recognition plugin to set the category to playAndRecord
https://github.com/nmfisher/speech_recognition/commit/48d4cccadd5a9381bc7df49f7ab63c792419f40f
yes, i also manually updated this file.. /ios/.symlinks/plugins//speech_recognition/ios/Classes/SwiftSpeechRecognitionPlugin.swift
i hope i will not forget that i updated the file and upgrade the version.. hehehe..
I am building an app where I use both speech recognition and text-to-speech. However, I have encountered an error where the microphone used for speech recognition is being kept on even after I stop the recognition with stop() or close() or if it completes on its own. If the mic is kept on I cannot play any sounds and hence the text-to-speech doesn't work after I use speech recognition.