Questions tagged [sfspeechrecognizer]

Use this tag for iOS 10+ Speech framework's main class SFSpeechRecognizer.

119 questions
3
votes
0 answers

recording and speech recognition at the same time with SpeechRecognizer and MediaRecorder

I'm trying to record audio and do speech recognition at the same time. Each of them works separately, but together only the recording works. The code looks like that: private SpeechRecognizer sr; private MediaRecorder recorder; private void…
3
votes
1 answer

Swift Numbers Name Text to Int

I just implemented SFSpeechRecognizer, because I want it to dictate some numbers, but the issue that I'm encountering is that if I say "one" the result.bestTranscription.formattedString is "one", but if I say "ten" the result throws "10", how can I…
3
votes
1 answer

AVAudioSession issue when using SFSpeechRecognizer after AVSpeechUtterance

am trying to use SFSpeechRecognizer for speech to text, after speaking a welcome message to the user via AVSpeechUtterance. But randomly, the speech recognition does not start(after speaking the welcome message) and it throws the error message…
3
votes
1 answer

Get voice amplitude from SFSpeechRecognizer

Im using this library https://github.com/appcoda/SpeechToTextDemo to transcript voice to text I want to have the real voice amplitude to show graph of voice with this library https://github.com/alankarmisra/SwiftSiriWaveformView i dont know how to…
OuSS
  • 1,047
  • 1
  • 15
  • 23
3
votes
2 answers

How to end a SFSpeechRecognitionTask after a few second of silence

I'm working with the new Apple Speech library and I can't find a command to flip the isFinal bool and end the transcription after a few seconds of silence. Does anyone know how to end the task after a bit of silence? Here is the code which I…
Patrick
  • 66
  • 1
  • 6
3
votes
0 answers

SFSpeechRecognitionTask - 'Use of undeclared type Builtin' error

While working with SFSpeechRecognizer I encounter this problem: Printing description of error.some.instance_type: expression produced error: error: /var/folders/k8/ppsgsylx27b5061mkcw9c7n40000gn/T/./lldb/4446/expr7.swift:1:65: error: use of…
3
votes
1 answer

AVAudioEngine with Today Extension

Hello I want to add the Speech framework to an iOS 10 Today Extension. I try to use SpeakToMe sample https://developer.apple.com/library/content/samplecode/SpeakToMe/Introduction/Intro.html to record audio with AVAudioEngine. But I get an exception…
2
votes
0 answers

SFspeechRecognizer recognize speech more than one minutes in ios 15?

I'm beginner swift programmer. Ios 15 can transcribe speech more than 1 minute. Can SfSpeechRecognizer transcribe speech more than 1 minute? Thanks for reading my question.
kabakaba
  • 61
  • 4
2
votes
1 answer

Publishing and Consuming a transcript from SFSpeechRecognizer

I'm using Apple's example of an Observable wrapper around SFSpeechRecognizer as follows: class SpeechRecognizer: ObservableObject { @Published var transcript: String func transcribe() {} } The goal is to use a ViewModel to both consume the…
Wesley
  • 5,381
  • 9
  • 42
  • 65
2
votes
0 answers

Is SFSpeechRecognizer able to return the result in pinyin?

Currently I'm using my SFSpeechRecognizer to detect spoken words in chinese what works pretty good so far. The result is given in chinese character, but is there a way to get the spoken words in pinyin as well? I only know three different language…
Erik
  • 449
  • 5
  • 13
2
votes
1 answer

Require on device recognition

Is there any way to know how long it takes Swift to download speech models?
Michael Jajou
  • 312
  • 2
  • 13
2
votes
1 answer

Why SFSpeechRecognizer doesn't working in ipad

SFSpeechRecognizer is working well in IOS But it doesn't available in IPAD. I don't know how to fix it. Please give me a solution. func recordAndRecognizeSpeech() { let node = audioEngine.inputNode let recordingFormat =…
이요한
  • 31
  • 1
2
votes
3 answers

Is it possible to limit SFSpeechRecognizer's vocabulary?

I'd like to use the ios SFSpeechRecognizer to recognize a closed set of words and phrases. Is there a way to specify these and remove all other possibilities? I cannot seem to find a way to do this.
synchronizer
  • 1,955
  • 1
  • 14
  • 37
2
votes
0 answers

Getting numbers in word format in SFSpeechRecognizer instead of numbers

Is there any way of printing numbers into proper spellings instead of throwing numbers while recording voice via SFSpeechRecognizer? I've tried to get the word format by implementing the code below: if let resultString =…
Parthib Biswas
  • 471
  • 1
  • 7
  • 17
2
votes
0 answers

Adjust Background noice sensitivity in Android Speech-to-text recognition

Android Speech-to-text is very sensitive to background noises. The use-case is to use Speech-to-text in an area where light background noises will be constant. Want to control the speech recognition only with certain voice levels. Tried working…