Skip to content

Commit

Permalink
Removed auditok to remove OS specific dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
beveradb committed Dec 4, 2024
1 parent 9f0ef2b commit 5810df4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 620 deletions.
54 changes: 0 additions & 54 deletions .github/removetritonandpyaudio.patch

This file was deleted.

5 changes: 4 additions & 1 deletion lyrics_transcriber/transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,10 @@ def transcribe(self):
self.logger.debug(f"Using Whisper for transcription with model: {self.transcription_model}")
audio = whisper.load_audio(self.audio_filepath)
model = whisper.load_model(self.transcription_model, device="cpu")
transcription_data = whisper.transcribe(model, audio, language="en", vad="auditok", beam_size=5, temperature=0.2, best_of=5)
transcription_data = whisper.transcribe(model, audio, language="en", beam_size=5, temperature=0.2, best_of=5)

# auditok is needed for voice activity detection, but it has OS package dependencies that are hard to install on some platforms
# transcription_data = whisper.transcribe(model, audio, language="en", vad="auditok", beam_size=5, temperature=0.2, best_of=5)

# Remove segments with no words, only music
transcription_data["segments"] = [segment for segment in transcription_data["segments"] if segment["text"].strip() != "Music"]
Expand Down
Loading

0 comments on commit 5810df4

Please sign in to comment.