Skip to content

Commit b4d17ad

Browse files
committed
Fix error in demo app
1 parent 8681fa4 commit b4d17ad

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

apps/speech/screens/SpeechToTextScreen.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,10 @@ export const SpeechToTextScreen = ({ onBack }: { onBack: () => void }) => {
8484
const decodedAudioData = await audioContext.decodeAudioDataSource(uri);
8585
const audioBuffer = decodedAudioData.getChannelData(0);
8686

87-
if (enableTimestamps) {
88-
const result = await model.transcribe(audioBuffer, {
89-
enableTimestamps: enableTimestamps,
90-
});
91-
setTranscription(result);
92-
}
87+
const result = await model.transcribe(audioBuffer, {
88+
enableTimestamps: enableTimestamps as any,
89+
});
90+
setTranscription(result);
9391
} catch (error) {
9492
console.error('Error decoding audio data', error);
9593
console.warn('Note: Supported file formats: mp3, wav, flac');

0 commit comments

Comments
 (0)