Fix hf whisper

This commit is contained in:
litagin02
2024-03-14 16:45:31 +09:00
parent a5540bdb2e
commit 8c95f0ff75
2 changed files with 3 additions and 5 deletions

View File

@@ -84,10 +84,6 @@ def transcribe_files_with_hf_whisper(
results: list[str] = []
for whisper_result in pipe(dataset):
logger.debug(whisper_result)
for result in enumerate(whisper_result):
logger.debug(result)
logger.debug(f"Transcribed: {result['text']}")
text: str = whisper_result["text"]
# なぜかテキストの最初に" {initial_prompt}"が入るので、文字の最初からこれを削除する
# cf. https://github.com/huggingface/transformers/issues/27594