Post

Replies

Boosts

Views

Activity

Reply to SFSpeechRecognitionResult discards previous transcripts with on-device option set to true
Did some further research into this topic. It seem that the SFTranscriptSegment array of the result will be cleared after certain standards were meet. By doing if let result { print("Segment.size: \(result.bestTranscription.segments.count)") //reset of the code... } At the time when the contents get cleared, it prints out like this on console: ... Segment.size: 108 Segment.size: 110 Segment.size: 111 Segment.size: 112 Segment.size: 112 Segment.size: 114 Segment.size: 105 Segment.size: 1 Segment.size: 2 Segment.size: 3 Segment.size: 4 Segment.size: 5 Segment.size: 6 ... The question can be how to determine which one will be the final result? By the way, the isFinal variable of the request never turned true during the contents being discarded.
Jun ’23