Skip to content

Commit 0249626

Browse files
style(mobile): wrap the Android dictation length check
1 parent 7f973ec commit 0249626

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/mobile/modules/t3-voice-transcription/android/src/main/java/expo/modules/t3voicetranscription/T3VoiceTranscriptionModule.kt‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ class T3VoiceTranscriptionModule : Module() {
3131
withContext(Dispatchers.IO) {
3232
require(android.net.Uri.parse(uri).scheme == "file") { "Expected a local recording." }
3333
withRecordedPcm(context, uri) { pcm ->
34-
requireCompleteAudio(pcm.length() <= 16000L * 2 * 301) { "Recording exceeds five minutes." }
34+
requireCompleteAudio(pcm.length() <= 16000L * 2 * 301) {
35+
"Recording exceeds five minutes."
36+
}
3537
pcm.readBytes()
3638
}
3739
}

0 commit comments

Comments
 (0)