title: iOS Speech framework yields zero confidence for certain locales
body: <p>When using the Speech framework, I am consistently noticing zero confidence values for certain locales (e.g. &quot;vi-VN&quot;, &quot;pt-PT&quot;, ...), while non-zero, accurate confidence values are returned for other locales (e.g. &quot;ko-KR&quot;, &quot;ja-JP&quot;, ...).</p>
  <p>Looking at the <a href="https://developer.apple.com/documentation/speech/sftranscriptionsegment/1649534-confidence" rel="nofollow noreferrer">documentation</a>, the confidence would be zero if there was no recognition. However, when the zero confidence occurs, the <code>formattedString</code> of the <code>bestTranscription</code> is populated and accurate (same for each segment substring text).</p>
  <p>I have tried instantiating the locales in various ways (language code only, language and region code, -/_ formatting, grabbing an instance directly off of the <code>SFSpeechRecognizer.supportedLocales()</code> array). I have also tried setting the <code>defaultTaskHint</code> of <code>SFSpeechRecognizer</code> and taskHint of <code>SFSpeechRecognitionRequest</code> to dictation.</p>
  <p>I am stuck at this point. Any help would be appreciated. Thanks in advance :)</p>
  <pre><code>guard let locale = Locale(identifier: &quot;vi-VN&quot;),
        let recognizer = SFSpeechRecognizer(locale: locale),
        recognizer.isAvailable else {
    return
  }
  
  recognizer.defaultTaskHint = .dictation
  
  let request = SFSpeechURLRecognitionRequest(url: ...)
  request.contextualStrings = ...
  request.shouldReportPartialResults = true
  request.taskHint = .dictation
      
  recognizer.recognitionTask(with: request) { (result, error) in
    ...
    if (result.isFinal) {
      let transcription = result.bestTranscription
      /// transcription.formattedString is correct
      /// all segments confidence values are 0, but with the properly recognized substring text.
    }
    ...
  }
  </code></pre>