Skip to content

Commit

Permalink
update example to use on-device recognition on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
jamsch committed Nov 25, 2024
1 parent 370511a commit 6f3a39c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ function TranscribeLocalAudioFile() {
ExpoSpeechRecognitionModule.start({
lang: "en-US",
interimResults: true,
requiresOnDeviceRecognition: false,
requiresOnDeviceRecognition: Platform.OS === "ios",
audioSource: {
uri: localUri,
audioChannels: 1,
Expand Down
1 change: 0 additions & 1 deletion ios/ExpoSpeechRecognizer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ actor ExpoSpeechRecognizer: ObservableObject {

print("Audio streaming ended")
request.endAudio()

} catch {
print("Error feeding audio file: \(error)")
request.endAudio()
Expand Down

0 comments on commit 6f3a39c

Please sign in to comment.