Recognize spoken words in recorded or live audio using Speech.

Posts under Speech tag

200 Posts

Post

Replies

Boosts

Views

Activity

Web Speech Synthesis API: not all voices installed listed
I'm developing an application using the Web Speech API for speech synthesis. According to the API specification SpeechSynthesis.getVoices() should retrieve the voices available on the system. On my iPad Pro, 12,9 inch, 3rd generation, iOS 16 however this doesn't return all voices installed on the system. In system settings (Accessibility -> Spoken content -> Voices -> German) e.g. I see these voices: Anna Eloquence Markus Petra Siri Viktor Yannick However if for SpeechSynthesis.getVoices() I only get the voices within the group "Eloquence": Eddy Flo Grandma Grandpa Reed Rocko Sandy Shelley All other voices (Anna, Markus, etc.) are missing. Is this a bug or is it intended by Apple that it's impossible to use all voices? This is independent of the browser, it's the same for Safari, Chrome or Firefox. Use this in order to test which voices are available using the WebSpeech API: https://plnkr.co/edit/E2etsrUZVOVfrDwG
7
6
3.5k
Jan ’23
Same file, but length becomes zero when put in a different directory
I'm trying to read an AVAudioFile into a buffer. I found that when the directory is /Users/myusername/Library/Developer/CoreSimulator/Devices/112C1F73-326A-408F-B9CA-2DE6739D60F4/data/Containers/Data/Application/F98B01D3-8136-4188-8589-0E40E8C96559/Documents/rawAudioData/0_rawAudio.wav the length becomes zero. But when I move the same file to /Users/myusername/Downloads/swiftApps/0_rawAudio.wav the length and becomes normal again. I checked that the file is reachable phonebook directories. So why is this happening? Thanks!
0
0
744
Dec ’22
How to make speech recognition more accurate?
Hi, I'm using the Speech library to get speech recognition from AVAudioRecorder and store the text to database. However, most of the time it is not accurate. Heck, even "test 123" gave me entirely different words (eg. "this one till three", "this one ticket", etc). The funny thing was, it was correct a few times when it was still progressing, but then it changed into the wrong final words. So, how do I increase the accuracy of it? This is what I got as the settings:           try audioSession.setCategory(.record, mode: .spokenAudio, options: .duckOthers)          try audioSession.setActive(true, options: .notifyOthersOnDeactivation)      let recorderSettings: [String:Any] = [       AVFormatIDKey: NSNumber(value: kAudioFormatAppleLossless),        AVSampleRateKey: 44100.0,        AVNumberOfChannelsKey: 1,        AVEncoderAudioQualityKey: AVAudioQuality.max.rawValue     ] Is there anything else to improve? Thank you.
0
0
953
Dec ’22
Why can't I get more info on why SFSpeechRecognizer won't read my recorded audio files?
Updated info below Full disclosure: I do have this question over on StackOverflow, but I am at a standstill till I find a way to move forward, debug, etc. I am trying to recognize prerecorded speech in Swift. Essentially it either detects no speech, detects blank speech, or works on the one prerecorded file where I screamed a few words. I can't tell where the headache lies and can't figure out if there's a more detailed way to debug this. I can't find any properties that give more detailed info. Someone on SO did recommend I go through Apple's demo, here. This works just fine, and my code is very similar to it. Yet the main difference remains if there is something about the way I save my audio files or something else is leading to my headaches. If anyone has any insight into this I would very much appreciate any hints. My question over on StackOverflow Updated info below, and new code Updated info It appears that I was calling SFSpeechURLRecognitionRequest too often, and before I completed the first request. Perhaps I need to create a new instance of SFSpeechRecognizer? Unsure. Regardless, I quickly/sloppily adjusted the code to only run it once the previous instance returned its results. The results were much better, except one audio file still came up as no results. Not an error, just no text. This file is the same as the previous file, in that I took an audio recording and split it in two. So the formats and volumes are the same. So I still need a better way to debug this, to find out what it going wrong with that file. The code where I grab the file and attempt to read it func findAudioFiles(){ let fm = FileManager.default var aFiles : URL print ("\(urlPath)") do { let items = try fm.contentsOfDirectory(atPath: documentsPath) let filteredInterestArray1 = items.filter({$0.hasSuffix(".m4a")}) let filteredInterestArray2 = filteredInterestArray1.filter({$0.contains("SS-X-")}) let sortedItems = filteredInterestArray2.sorted() for item in sortedItems { audioFiles.append(item) } NotificationCenter.default.post(name: Notification.Name("goAndRead"), object: nil, userInfo: myDic) } catch { print ("\(error)") } } @objc func goAndRead(){ audioIndex += 1 if audioIndex != audioFiles.count { let fileURL = NSURL.fileURL(withPath: documentsPath + "/" + audioFiles[audioIndex], isDirectory: false) transcribeAudio(url: fileURL, item: audioFiles[audioIndex]) } } func requestTranscribePermissions() { SFSpeechRecognizer.requestAuthorization { [unowned self] authStatus in DispatchQueue.main.async { if authStatus == .authorized { print("Good to go!") } else { print("Transcription permission was declined.") } } } } func transcribeAudio(url: URL, item: String) { guard let recognizer = SFSpeechRecognizer(locale: Locale(identifier: "en-US")) else {return} let request = SFSpeechURLRecognitionRequest(url: url) if !recognizer.supportsOnDeviceRecognition { print ("offline not available") ; return } if !recognizer.isAvailable { print ("not available") ; return } request.requiresOnDeviceRecognition = true request.shouldReportPartialResults = true recognizer.recognitionTask(with: request) {(result, error) in guard let result = result else { print("\(item) : There was an error: \(error.debugDescription)") return } if result.isFinal { print("\(item) : \(result.bestTranscription.formattedString)") NotificationCenter.default.post(name: Notification.Name("goAndRead"), object: nil, userInfo: self.myDic) } } }
0
0
967
Dec ’22
SFTranscriptionSegment confidence is always 0 for Saudi Arabia, but ok for USA
Hello, I have SFSpeechRecognizer initialised with Locale(identifier: "en-US") After setting Region (on phone settings) to one of these countries: Saudi Arabia United Arab Emirates Malaysia SFTranscriptionSegment always have confidence 0. Setting Region back to United States (or Russia) makes confidence correct (non-zero value). This issue is 100% reproducible on Simulator & Device with SpeakToMe sample App by Apple https://developer.apple.com/library/archive/samplecode/SpeakToMe/Introduction/Intro.html I'm adopted it to Swift 5 and added logging. Modified Sample project's ViewController.swift is attached. ViewController.swift - https://developer.apple.com/forums/content/attachment/8695df58-1a4a-4e14-8c1b-4b052d437f68 To reproduce: Tap "Start recording" Say "My name is Max" Tap "Stop recording" Last output for Saudi Arabia: New result from recognition task Segment confidence: 0.0 Segment confidence: 0.0 Segment confidence: 0.0 Segment confidence: 0.0 Segment confidence: 0.0 Last output for United States: New result from recognition task Segment confidence: 0.925 Segment confidence: 0.929 Segment confidence: 0.929 Segment confidence: 0.931 Segment confidence: 0.922
1
0
1.1k
Nov ’22
iOS 16 Text-To-Speech Crash
My app uses text to speech and i am getting crashes on a daily basis by users using iOS 16. The app has never had such issues before iOS16. Crashed: com.apple.TextToSpeech.SpeechThread EXC_BAD_ACCESS KERN_PROTECTION_FAILURE 0x0000000ffd6be900 0 libobjc.A.dylib objc_release + 16 1 libobjc.A.dylib objc_release_x0 + 16 2 libobjc.A.dylib AutoreleasePoolPage::releaseUntil(objc_object**) + 196 3 libobjc.A.dylib objc_autoreleasePoolPop + 256 4 libobjc.A.dylib objc_tls_direct_base<AutoreleasePoolPage*, (tls_key)3, AutoreleasePoolPage::HotPageDealloc>::dtor_(void*) + 168 5 libsystem_pthread.dylib _pthread_tsd_cleanup + 620 6 libsystem_pthread.dylib _pthread_exit + 84 7 libsystem_pthread.dylib _pthread_start + 160 8 libsystem_pthread.dylib thread_start + 8
1
1
1.6k
Nov ’22
Critical BUG! Could you fix it asap or at least set the try/catch block with the reporting via NSError or somehow else?
Crashed: com.apple.TextToSpeech.SpeechThread 0 libobjc.A.dylib 0x3518 objc_release + 16 1 libobjc.A.dylib 0x3518 objc_release_x0 + 16 2 libobjc.A.dylib 0x15d8 AutoreleasePoolPage::releaseUntil(objc_object**) + 196 3 libobjc.A.dylib 0x4f40 objc_autoreleasePoolPop + 256 4 libobjc.A.dylib 0x329dc objc_tls_direct_base<AutoreleasePoolPage*, (tls_key)3, AutoreleasePoolPage::HotPageDealloc>::dtor_(void*) + 168 5 libsystem_pthread.dylib 0x1bd8 _pthread_tsd_cleanup + 620 6 libsystem_pthread.dylib 0x4674 _pthread_exit + 84 7 libsystem_pthread.dylib 0x16d8 _pthread_start + 160 8 libsystem_pthread.dylib 0xba4 thread_start + 8
4
0
1.3k
Nov ’22
Question: How to stop a sound that has lost control (AVSpeechSynthesizer)
I'm struggling with a recent bug in iOS 16. There are various errors and bugs Currently struggling with AVSpeechSynthesizer. AutoReleasePool crashes frequently. I also posted a similar post on the forum before. https://developer.apple.com/forums/tags/speech There seems to be a lot of similar cases in the forum posts above. When AVSpeechSynthesizer is stopped, it does not stop immediately, but continues to play to the end. In that situation, even if you stop again, you lose control and cannot stop. Is there any way to stop the currently playing sound at will when I lose control like this? (I was also able to confirm that the error persisted without being fixed when I tested it on a device that just installed the 16.2 beta.)
2
0
1k
Nov ’22
Build a virtual keyboard that dictate Cantonese continuously without stopping
I feel the need to have a virtual keyboard that dictate Cantonese continuously until manually stopping it, instead of automatically stopping itself every 1 minute. So is it possible to build a keyboard like the in-built one in iPhone 6s, with a dictate microphone icon? And if there any existing codes that can be reused and easily making modification to it so that it can run without stopping itself? Thanks
0
0
733
Oct ’22
Web Speech API bugs in iOS 15.1 and macOS Monterey
Hi, I've been working on a project that utilizes the Web Speech API: https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API. However, I've noticed some strange behavior in the newest versions of Safari on iOS, iPadOS, and macOS. One issue that occurs regularly is that the text input will repeat after voice input has ended. This can be seen on this demo provided by Google: https://www.google.com/intl/en/chrome/demos/speech.html This was not happening when I tested on 14.1 (the version I upgraded from). Upon debugging, it appears the doubling of text is included in transcriptions that are not flagged as isFinal, as well as transcriptions that are, which makes me think that something isn't working properly in the implementation of the API. Anecdotally, the speech synthesis appears to be much less accurate now as well, and I've noticed some odd behavior when I set the continuous flag to false as well. The API delegates the actual speech synthesis work to Siri, so I'm wondering why there would be a different here compared to using dictation in other apps. My main question is: has anyone else run into problems like this? If so, how are you working around them?
5
2
6.3k
Oct ’22
SFSpeechRecognizer on MacOS - crash
I'm debuggin a macOS application that uses SFSpeechRecognizer to translate a video or audio file into a text file. I think that I'm doing something wrong when I call SFSpeechRecognizer. Here is the code:      guard let myRecognizer = SFSpeechRecognizer() else {       // A recognizer is not supported for the current locale       print("Recognizer not supported for current locale")       self.titleText = "Recognizer not supported for current locale"       return     }           if !myRecognizer.isAvailable {       // The recognizer is not available right now       print("Recognizer is not available right now")       self.titleText = "Recognizer is not available right now"       return     }               let request = SFSpeechURLRecognitionRequest(url: url)     myRecognizer.recognitionTask(with: request) { (result, error) in And this is the relevant stack trace. Application Specific Backtrace 0: 0 CoreFoundation 0x00000001b5e9d148 __exceptionPreprocess + 240 1 libobjc.A.dylib 0x00000001b5be7e04 objc_exception_throw + 60 2 AVFCore 0x00000001c851701c -[AVAssetReaderAudioMixOutput initWithAudioTracks:audioSettings:] + 984 3 AVFCore 0x00000001c8516c28 +[AVAssetReaderAudioMixOutput assetReaderAudioMixOutputWithAudioTracks:audioSettings:] + 52 4 Speech 0x00000001e46f1348 __151-[SFSpeechURLRecognitionRequest _handlePreRecordedAudioWithAsset:audioTracks:narrowband:addSpeechDataBlock:stopSpeechBlock:cancelSpeechWithErrorBlock:]_block_invoke.227 + 380 5 Speech 0x00000001e46f1130 __151-[SFSpeechURLRecognitionRequest _handlePreRecordedAudioWithAsset:audioTracks:narrowband:addSpeechDataBlock:stopSpeechBlock:cancelSpeechWithErrorBlock:]_block_invoke + 212 6 libdispatch.dylib 0x00000001b5b8a5f0 _dispatch_call_block_and_release + 32 7 libdispatch.dylib 0x00000001b5b8c1b4 _dispatch_client_callout + 20 8 libdispatch.dylib 0x00000001b5b8f2c8 _dispatch_queue_override_invoke + 784 9 libdispatch.dylib 0x00000001b5b9d8e8 _dispatch_root_queue_drain + 396 10 libdispatch.dylib 0x00000001b5b9e104 _dispatch_worker_thread2 + 164 11 libsystem_pthread.dylib 0x00000001b5d4c324 _pthread_wqthread + 228 12 libsystem_pthread.dylib 0x00000001b5d4b080 start_wqthread + 8 Full ips file attached. Thanks for taking a look :) Speech+Recognizer+2-2022-09-16-160824.txt
2
0
998
Sep ’22
Guys I dont know what I am doing here.
OK so I have been trying to find the right way to develop a program that runs in the background of my MacBook Air 2021 and all It will do is create a read-only text transcript file of the speech from the audio output: speaker, headphones, etc. Not only that, but the original speech from the audio/video file will be transcripted into a read-only text file. Not only that but there will be a read-only file created to pinpoint he origin of the audio speaker output and the origin of the file the audio is supposedly coming from. So each time I play a video or movie whether its YouTube Netflix prime video Vimeo etc, an instance will occur that creates 4 of the read-only text files. The directory could be created when the program is setup on my laptop, and I could change the directory if need be. I read some things about programming in swift and it seems overwhelming in the sense that this program could take more time than I expect it to in order to be fully functional. And another thing is that I see no commercial value in this program/product so it will essentially be an example of the many possibilities of swift. I believe that the program needs these specifications but It could be written in a way I dont expect it to be written. Maybe If I was given a direction of what book would be best for developing this program, completely full of all the jargon I need to learn. I would be forever grateful to the swift development team. But this program seems very unnecessary I guess so I am not expecting too much.
2
0
1.3k
Sep ’22
Safari Web Speech boundary events for Spanish content on OS X
I am on Monterey 12.1/Safari 15.2 and am seeing a problem with Web Speech boundary events in that if my utterance text has spaces in it then the tracking index only reflects half of those spaces rounded down. So if the first word is prefix by 1 space then no problem, but with 2 it acts like there's just 1 space and 3-4=>2, 5-6=>3 spaces with respect to the character index during tracking. This is not an issue for English content (and didn't use to be an issue for Spanish content). I have attached a test page as an example. ssml.html Load it up, choose a Spanish voice pack (e.g. Juan), type in 'Yo tengo un gato y un perro.' (Yeah, I know my Spanish is impressive.) and try clicking Speak and adding spaces. You'll note the character indices are the same for 1 or 2 spaces... etc. P.S. I can't find an appropriate tag for Speech Synthesis related issues.
4
0
1.3k
Sep ’22
Some users, but not all, need to have Dictation enabled in their keyboard settings to receive voice recognition data from the speech framework
Hello. I have an app that makes use of the speech framework for speech to text. A couple of our testers have reported that the text to speech does not work unless Dictation is enabled in the keyboard settings. This was reported by a tester on an iPhone 8 Plus running iOS 15.5 (issue persisted after updating to 15.6), as well as another tester on an iPhone 12 running iOS 15.2.1. However, we were unable to reproduce this on our end on the following devices: iPhone SE (2nd gen) running iOS 15.6 iPad air running iOS 12.5.5 iPod touch (6th gen ) running iOS 12.5.5 iPhone 13 pro running iOS 15.6 STT works on these devices regardless if keyboard dictation is on or off. Why is this only required on a small handful of devices??
1
0
825
Aug ’22
Web Speech Synthesis API: not all voices installed listed
I'm developing an application using the Web Speech API for speech synthesis. According to the API specification SpeechSynthesis.getVoices() should retrieve the voices available on the system. On my iPad Pro, 12,9 inch, 3rd generation, iOS 16 however this doesn't return all voices installed on the system. In system settings (Accessibility -> Spoken content -> Voices -> German) e.g. I see these voices: Anna Eloquence Markus Petra Siri Viktor Yannick However if for SpeechSynthesis.getVoices() I only get the voices within the group "Eloquence": Eddy Flo Grandma Grandpa Reed Rocko Sandy Shelley All other voices (Anna, Markus, etc.) are missing. Is this a bug or is it intended by Apple that it's impossible to use all voices? This is independent of the browser, it's the same for Safari, Chrome or Firefox. Use this in order to test which voices are available using the WebSpeech API: https://plnkr.co/edit/E2etsrUZVOVfrDwG
Replies
7
Boosts
6
Views
3.5k
Activity
Jan ’23
Is Speech Framework is available for Apple Tv
We are not able to find speech framework for apple tv. we have to implement Speech to Text in our application. When we are import speech framework in Apple Tv we get Error Like (No such module 'Speech' Please provide solution for this. )
Replies
0
Boosts
0
Views
1.1k
Activity
Jan ’23
Same file, but length becomes zero when put in a different directory
I'm trying to read an AVAudioFile into a buffer. I found that when the directory is /Users/myusername/Library/Developer/CoreSimulator/Devices/112C1F73-326A-408F-B9CA-2DE6739D60F4/data/Containers/Data/Application/F98B01D3-8136-4188-8589-0E40E8C96559/Documents/rawAudioData/0_rawAudio.wav the length becomes zero. But when I move the same file to /Users/myusername/Downloads/swiftApps/0_rawAudio.wav the length and becomes normal again. I checked that the file is reachable phonebook directories. So why is this happening? Thanks!
Replies
0
Boosts
0
Views
744
Activity
Dec ’22
Crash: SLDictLookup::Create unable to handle this locale.
My app uses AVSpeechSynthesizer.And when I setup russian language in settings like main language and use voice with identifier which contain com.apple.speech.synthesis.voice, i catch crash Crash: SLDictLookup::Create unable to handle this locale.
Replies
1
Boosts
0
Views
883
Activity
Dec ’22
How to make speech recognition more accurate?
Hi, I'm using the Speech library to get speech recognition from AVAudioRecorder and store the text to database. However, most of the time it is not accurate. Heck, even "test 123" gave me entirely different words (eg. "this one till three", "this one ticket", etc). The funny thing was, it was correct a few times when it was still progressing, but then it changed into the wrong final words. So, how do I increase the accuracy of it? This is what I got as the settings:           try audioSession.setCategory(.record, mode: .spokenAudio, options: .duckOthers)          try audioSession.setActive(true, options: .notifyOthersOnDeactivation)      let recorderSettings: [String:Any] = [       AVFormatIDKey: NSNumber(value: kAudioFormatAppleLossless),        AVSampleRateKey: 44100.0,        AVNumberOfChannelsKey: 1,        AVEncoderAudioQualityKey: AVAudioQuality.max.rawValue     ] Is there anything else to improve? Thank you.
Replies
0
Boosts
0
Views
953
Activity
Dec ’22
Why can't I get more info on why SFSpeechRecognizer won't read my recorded audio files?
Updated info below Full disclosure: I do have this question over on StackOverflow, but I am at a standstill till I find a way to move forward, debug, etc. I am trying to recognize prerecorded speech in Swift. Essentially it either detects no speech, detects blank speech, or works on the one prerecorded file where I screamed a few words. I can't tell where the headache lies and can't figure out if there's a more detailed way to debug this. I can't find any properties that give more detailed info. Someone on SO did recommend I go through Apple's demo, here. This works just fine, and my code is very similar to it. Yet the main difference remains if there is something about the way I save my audio files or something else is leading to my headaches. If anyone has any insight into this I would very much appreciate any hints. My question over on StackOverflow Updated info below, and new code Updated info It appears that I was calling SFSpeechURLRecognitionRequest too often, and before I completed the first request. Perhaps I need to create a new instance of SFSpeechRecognizer? Unsure. Regardless, I quickly/sloppily adjusted the code to only run it once the previous instance returned its results. The results were much better, except one audio file still came up as no results. Not an error, just no text. This file is the same as the previous file, in that I took an audio recording and split it in two. So the formats and volumes are the same. So I still need a better way to debug this, to find out what it going wrong with that file. The code where I grab the file and attempt to read it func findAudioFiles(){ let fm = FileManager.default var aFiles : URL print ("\(urlPath)") do { let items = try fm.contentsOfDirectory(atPath: documentsPath) let filteredInterestArray1 = items.filter({$0.hasSuffix(".m4a")}) let filteredInterestArray2 = filteredInterestArray1.filter({$0.contains("SS-X-")}) let sortedItems = filteredInterestArray2.sorted() for item in sortedItems { audioFiles.append(item) } NotificationCenter.default.post(name: Notification.Name("goAndRead"), object: nil, userInfo: myDic) } catch { print ("\(error)") } } @objc func goAndRead(){ audioIndex += 1 if audioIndex != audioFiles.count { let fileURL = NSURL.fileURL(withPath: documentsPath + "/" + audioFiles[audioIndex], isDirectory: false) transcribeAudio(url: fileURL, item: audioFiles[audioIndex]) } } func requestTranscribePermissions() { SFSpeechRecognizer.requestAuthorization { [unowned self] authStatus in DispatchQueue.main.async { if authStatus == .authorized { print("Good to go!") } else { print("Transcription permission was declined.") } } } } func transcribeAudio(url: URL, item: String) { guard let recognizer = SFSpeechRecognizer(locale: Locale(identifier: "en-US")) else {return} let request = SFSpeechURLRecognitionRequest(url: url) if !recognizer.supportsOnDeviceRecognition { print ("offline not available") ; return } if !recognizer.isAvailable { print ("not available") ; return } request.requiresOnDeviceRecognition = true request.shouldReportPartialResults = true recognizer.recognitionTask(with: request) {(result, error) in guard let result = result else { print("\(item) : There was an error: \(error.debugDescription)") return } if result.isFinal { print("\(item) : \(result.bestTranscription.formattedString)") NotificationCenter.default.post(name: Notification.Name("goAndRead"), object: nil, userInfo: self.myDic) } } }
Replies
0
Boosts
0
Views
967
Activity
Dec ’22
SFTranscriptionSegment confidence is always 0 for Saudi Arabia, but ok for USA
Hello, I have SFSpeechRecognizer initialised with Locale(identifier: "en-US") After setting Region (on phone settings) to one of these countries: Saudi Arabia United Arab Emirates Malaysia SFTranscriptionSegment always have confidence 0. Setting Region back to United States (or Russia) makes confidence correct (non-zero value). This issue is 100% reproducible on Simulator &amp; Device with SpeakToMe sample App by Apple https://developer.apple.com/library/archive/samplecode/SpeakToMe/Introduction/Intro.html I'm adopted it to Swift 5 and added logging. Modified Sample project's ViewController.swift is attached. ViewController.swift - https://developer.apple.com/forums/content/attachment/8695df58-1a4a-4e14-8c1b-4b052d437f68 To reproduce: Tap "Start recording" Say "My name is Max" Tap "Stop recording" Last output for Saudi Arabia: New result from recognition task Segment confidence: 0.0 Segment confidence: 0.0 Segment confidence: 0.0 Segment confidence: 0.0 Segment confidence: 0.0 Last output for United States: New result from recognition task Segment confidence: 0.925 Segment confidence: 0.929 Segment confidence: 0.929 Segment confidence: 0.931 Segment confidence: 0.922
Replies
1
Boosts
0
Views
1.1k
Activity
Nov ’22
SFSpeechURLRecognitionRequest error couldn’t be opened because you don’t have permission to view it.
I get that this "file couldn’t be opened because you don’t have permission to view it." error when I try and transcribe audio using a URL What could be the issue?
Replies
0
Boosts
0
Views
616
Activity
Nov ’22
iOS 16 Text-To-Speech Crash
My app uses text to speech and i am getting crashes on a daily basis by users using iOS 16. The app has never had such issues before iOS16. Crashed: com.apple.TextToSpeech.SpeechThread EXC_BAD_ACCESS KERN_PROTECTION_FAILURE 0x0000000ffd6be900 0 libobjc.A.dylib objc_release + 16 1 libobjc.A.dylib objc_release_x0 + 16 2 libobjc.A.dylib AutoreleasePoolPage::releaseUntil(objc_object**) + 196 3 libobjc.A.dylib objc_autoreleasePoolPop + 256 4 libobjc.A.dylib objc_tls_direct_base<AutoreleasePoolPage*, (tls_key)3, AutoreleasePoolPage::HotPageDealloc>::dtor_(void*) + 168 5 libsystem_pthread.dylib _pthread_tsd_cleanup + 620 6 libsystem_pthread.dylib _pthread_exit + 84 7 libsystem_pthread.dylib _pthread_start + 160 8 libsystem_pthread.dylib thread_start + 8
Replies
1
Boosts
1
Views
1.6k
Activity
Nov ’22
Critical BUG! Could you fix it asap or at least set the try/catch block with the reporting via NSError or somehow else?
Crashed: com.apple.TextToSpeech.SpeechThread 0 libobjc.A.dylib 0x3518 objc_release + 16 1 libobjc.A.dylib 0x3518 objc_release_x0 + 16 2 libobjc.A.dylib 0x15d8 AutoreleasePoolPage::releaseUntil(objc_object**) + 196 3 libobjc.A.dylib 0x4f40 objc_autoreleasePoolPop + 256 4 libobjc.A.dylib 0x329dc objc_tls_direct_base<AutoreleasePoolPage*, (tls_key)3, AutoreleasePoolPage::HotPageDealloc>::dtor_(void*) + 168 5 libsystem_pthread.dylib 0x1bd8 _pthread_tsd_cleanup + 620 6 libsystem_pthread.dylib 0x4674 _pthread_exit + 84 7 libsystem_pthread.dylib 0x16d8 _pthread_start + 160 8 libsystem_pthread.dylib 0xba4 thread_start + 8
Replies
4
Boosts
0
Views
1.3k
Activity
Nov ’22
Question: How to stop a sound that has lost control (AVSpeechSynthesizer)
I'm struggling with a recent bug in iOS 16. There are various errors and bugs Currently struggling with AVSpeechSynthesizer. AutoReleasePool crashes frequently. I also posted a similar post on the forum before. https://developer.apple.com/forums/tags/speech There seems to be a lot of similar cases in the forum posts above. When AVSpeechSynthesizer is stopped, it does not stop immediately, but continues to play to the end. In that situation, even if you stop again, you lose control and cannot stop. Is there any way to stop the currently playing sound at will when I lose control like this? (I was also able to confirm that the error persisted without being fixed when I tested it on a device that just installed the 16.2 beta.)
Replies
2
Boosts
0
Views
1k
Activity
Nov ’22
speech recognition
speech recognition stop listing to voice
Replies
1
Boosts
0
Views
858
Activity
Oct ’22
Build a virtual keyboard that dictate Cantonese continuously without stopping
I feel the need to have a virtual keyboard that dictate Cantonese continuously until manually stopping it, instead of automatically stopping itself every 1 minute. So is it possible to build a keyboard like the in-built one in iPhone 6s, with a dictate microphone icon? And if there any existing codes that can be reused and easily making modification to it so that it can run without stopping itself? Thanks
Replies
0
Boosts
0
Views
733
Activity
Oct ’22
Web Speech API bugs in iOS 15.1 and macOS Monterey
Hi, I've been working on a project that utilizes the Web Speech API: https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API. However, I've noticed some strange behavior in the newest versions of Safari on iOS, iPadOS, and macOS. One issue that occurs regularly is that the text input will repeat after voice input has ended. This can be seen on this demo provided by Google: https://www.google.com/intl/en/chrome/demos/speech.html This was not happening when I tested on 14.1 (the version I upgraded from). Upon debugging, it appears the doubling of text is included in transcriptions that are not flagged as isFinal, as well as transcriptions that are, which makes me think that something isn't working properly in the implementation of the API. Anecdotally, the speech synthesis appears to be much less accurate now as well, and I've noticed some odd behavior when I set the continuous flag to false as well. The API delegates the actual speech synthesis work to Siri, so I'm wondering why there would be a different here compared to using dictation in other apps. My main question is: has anyone else run into problems like this? If so, how are you working around them?
Replies
5
Boosts
2
Views
6.3k
Activity
Oct ’22
Why SFSpeechRecognizer.supportsOnDeviceRecognition is writable?
Why supportsOnDeviceRecognition option of SFSpeechRecognizer object is writable? Does it make any sense to set it to true? What will happen?
Replies
0
Boosts
0
Views
531
Activity
Sep ’22
AVSpeechSynthesizer privacy question
Hello! I have a question about AVSpeechSynthesizer relating to privacy. I'm wondering if the processing that happens in AVSpeechSynthesizer is local to the app I'm building or some part of the audio/text is shared with Apple in order to improve the service or for some other purpose.
Replies
1
Boosts
0
Views
1.2k
Activity
Sep ’22
SFSpeechRecognizer on MacOS - crash
I'm debuggin a macOS application that uses SFSpeechRecognizer to translate a video or audio file into a text file. I think that I'm doing something wrong when I call SFSpeechRecognizer. Here is the code:      guard let myRecognizer = SFSpeechRecognizer() else {       // A recognizer is not supported for the current locale       print("Recognizer not supported for current locale")       self.titleText = "Recognizer not supported for current locale"       return     }           if !myRecognizer.isAvailable {       // The recognizer is not available right now       print("Recognizer is not available right now")       self.titleText = "Recognizer is not available right now"       return     }               let request = SFSpeechURLRecognitionRequest(url: url)     myRecognizer.recognitionTask(with: request) { (result, error) in And this is the relevant stack trace. Application Specific Backtrace 0: 0 CoreFoundation 0x00000001b5e9d148 __exceptionPreprocess + 240 1 libobjc.A.dylib 0x00000001b5be7e04 objc_exception_throw + 60 2 AVFCore 0x00000001c851701c -[AVAssetReaderAudioMixOutput initWithAudioTracks:audioSettings:] + 984 3 AVFCore 0x00000001c8516c28 +[AVAssetReaderAudioMixOutput assetReaderAudioMixOutputWithAudioTracks:audioSettings:] + 52 4 Speech 0x00000001e46f1348 __151-[SFSpeechURLRecognitionRequest _handlePreRecordedAudioWithAsset:audioTracks:narrowband:addSpeechDataBlock:stopSpeechBlock:cancelSpeechWithErrorBlock:]_block_invoke.227 + 380 5 Speech 0x00000001e46f1130 __151-[SFSpeechURLRecognitionRequest _handlePreRecordedAudioWithAsset:audioTracks:narrowband:addSpeechDataBlock:stopSpeechBlock:cancelSpeechWithErrorBlock:]_block_invoke + 212 6 libdispatch.dylib 0x00000001b5b8a5f0 _dispatch_call_block_and_release + 32 7 libdispatch.dylib 0x00000001b5b8c1b4 _dispatch_client_callout + 20 8 libdispatch.dylib 0x00000001b5b8f2c8 _dispatch_queue_override_invoke + 784 9 libdispatch.dylib 0x00000001b5b9d8e8 _dispatch_root_queue_drain + 396 10 libdispatch.dylib 0x00000001b5b9e104 _dispatch_worker_thread2 + 164 11 libsystem_pthread.dylib 0x00000001b5d4c324 _pthread_wqthread + 228 12 libsystem_pthread.dylib 0x00000001b5d4b080 start_wqthread + 8 Full ips file attached. Thanks for taking a look :) Speech+Recognizer+2-2022-09-16-160824.txt
Replies
2
Boosts
0
Views
998
Activity
Sep ’22
Guys I dont know what I am doing here.
OK so I have been trying to find the right way to develop a program that runs in the background of my MacBook Air 2021 and all It will do is create a read-only text transcript file of the speech from the audio output: speaker, headphones, etc. Not only that, but the original speech from the audio/video file will be transcripted into a read-only text file. Not only that but there will be a read-only file created to pinpoint he origin of the audio speaker output and the origin of the file the audio is supposedly coming from. So each time I play a video or movie whether its YouTube Netflix prime video Vimeo etc, an instance will occur that creates 4 of the read-only text files. The directory could be created when the program is setup on my laptop, and I could change the directory if need be. I read some things about programming in swift and it seems overwhelming in the sense that this program could take more time than I expect it to in order to be fully functional. And another thing is that I see no commercial value in this program/product so it will essentially be an example of the many possibilities of swift. I believe that the program needs these specifications but It could be written in a way I dont expect it to be written. Maybe If I was given a direction of what book would be best for developing this program, completely full of all the jargon I need to learn. I would be forever grateful to the swift development team. But this program seems very unnecessary I guess so I am not expecting too much.
Replies
2
Boosts
0
Views
1.3k
Activity
Sep ’22
Safari Web Speech boundary events for Spanish content on OS X
I am on Monterey 12.1/Safari 15.2 and am seeing a problem with Web Speech boundary events in that if my utterance text has spaces in it then the tracking index only reflects half of those spaces rounded down. So if the first word is prefix by 1 space then no problem, but with 2 it acts like there's just 1 space and 3-4=>2, 5-6=>3 spaces with respect to the character index during tracking. This is not an issue for English content (and didn't use to be an issue for Spanish content). I have attached a test page as an example. ssml.html Load it up, choose a Spanish voice pack (e.g. Juan), type in 'Yo tengo un gato y un perro.' (Yeah, I know my Spanish is impressive.) and try clicking Speak and adding spaces. You'll note the character indices are the same for 1 or 2 spaces... etc. P.S. I can't find an appropriate tag for Speech Synthesis related issues.
Replies
4
Boosts
0
Views
1.3k
Activity
Sep ’22
Some users, but not all, need to have Dictation enabled in their keyboard settings to receive voice recognition data from the speech framework
Hello. I have an app that makes use of the speech framework for speech to text. A couple of our testers have reported that the text to speech does not work unless Dictation is enabled in the keyboard settings. This was reported by a tester on an iPhone 8 Plus running iOS 15.5 (issue persisted after updating to 15.6), as well as another tester on an iPhone 12 running iOS 15.2.1. However, we were unable to reproduce this on our end on the following devices: iPhone SE (2nd gen) running iOS 15.6 iPad air running iOS 12.5.5 iPod touch (6th gen ) running iOS 12.5.5 iPhone 13 pro running iOS 15.6 STT works on these devices regardless if keyboard dictation is on or off. Why is this only required on a small handful of devices??
Replies
1
Boosts
0
Views
825
Activity
Aug ’22