diff options
Diffstat (limited to 'Examples')
| -rw-r--r-- | Examples/WhisperDesktop/TranscribeDlg.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Examples/WhisperDesktop/TranscribeDlg.cpp b/Examples/WhisperDesktop/TranscribeDlg.cpp index cd23c93..b99e98a 100644 --- a/Examples/WhisperDesktop/TranscribeDlg.cpp +++ b/Examples/WhisperDesktop/TranscribeDlg.cpp @@ -298,7 +298,6 @@ HRESULT TranscribeDlg::transcribe() CComPtr<iAudioReader> reader; CHECK_EX( appState.mediaFoundation->openAudioFile( transcribeArgs.pathMedia, false, &reader ) ); - CHECK_EX( reader->getDuration( transcribeArgs.mediaDuration ) ); const eOutputFormat format = transcribeArgs.format; CAtlFile outputFile; @@ -324,6 +323,11 @@ HRESULT TranscribeDlg::transcribe() // Run the transcribe CHECK_EX( context->runStreamed( fullParams, progressSink, reader ) ); + // Once finished, query duration of the audio. + // The duration before the processing is sometimes different, by 20 seconds for the file in that issue: + // https://github.com/Const-me/Whisper/issues/4 + CHECK_EX( reader->getDuration( transcribeArgs.mediaDuration ) ); + context->timingsPrint(); if( format == eOutputFormat::None ) |
