Is it possible to transcribe only a section of an audio file? #340
Unanswered
orionflame
asked this question in
Q&A
Replies: 1 comment
-
There is no out-of-box way to do it with stable-ts but you can load just 120 seconds of audio then transcribe it. from stable_whisper.audio import AudioLoader
audio_loader = AudioLoader('audio.mp3', buffer_size='120s')
audio_chunk = audioloader.next_chunk(0)
audio_loader.terminate()
assert audio_chunk is not None and audio_chunk.shape[-1] > 0, 'empty audio chunk'
model = stable_whisper.load_model('base')
result = model.transcribe(audio_chunk) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Basically I want to identify the timing of the first word, so I will only transcribe the first 2 mins for example. Is it possible to tell stable whisper to only use that portion of an audio?
Otherwise I have to generate these clipped audio files temporarily just for stable ts.
Thanks a lot in advance.
Beta Was this translation helpful? Give feedback.
All reactions