csdcorp / speech_to_text

A Flutter plugin that exposes device specific text to speech recognition capability.
BSD 3-Clause "New" or "Revised" License
351 stars 218 forks source link

Library not working on ios 17 Simulator #440

Closed kevi5 closed 6 months ago

kevi5 commented 7 months ago

Hi, The speech-to-text library was working fine before the new iOS 17 and Xcode 15 update using Flutter 3.13.6 but now the speech-to-text just instantly closes itself after a few seconds. While running the example code, I get this error

flutter: 2023-10-04T03:06:39.773169 start listening flutter: 2023-10-04T03:06:42.495396 Received listener status: listening, listening: true flutter: 2023-10-04T03:06:43.958509 Received listener status: done, listening: false flutter: 2023-10-04T03:06:43.958762 Received error status: SpeechRecognitionError msg: error_unknown (1107), permanent: true, listening: false

I have tried downloading a different voice in iOS simulator settings -> accessibility -> Voice but it's not helping. I have not tried it on an original device yet.

Screenshot 2023-10-04 at 3 25 13 AM
octavioportaluppi commented 7 months ago

Exact same issue here. Any ideas on how to fix it?

sowens-csd commented 7 months ago

Simulators are a pain. It seems like each new iOS release causes speech issues. I'm seeing different issues but it is not working on the iOS 17 simulator. It is error_retry for me, unless I try on device then it is no match. I've done a bit of searching and I haven't found other reported issues of it yet. Right now I have no suggestions other than using a real device.

noobprograms commented 1 month ago

I have encountered the same issue along with another issue. Whatever I recognise, I am printing it on the console as well. On the terminal where I am using my android device, the logs show and the speech_to_text is working fine. When I do the same on my iPhone 11 Pro Max(physical device), the logs don't show on vscode terminal rather they show in the Xcode. And I see a really different format of recognised text. It appears to be in JSON format. like this Encoded JSON result: {"finalResult":false,"alternates":[{"confidence":0,"recognizedWords":"What is your name what's your"}]}