diff --git a/whisper_streaming/cli.py b/whisper_streaming/cli.py index 4d3a3ec..7c24f10 100644 --- a/whisper_streaming/cli.py +++ b/whisper_streaming/cli.py @@ -2,8 +2,7 @@ import argparse import queue -import sys -from logging import DEBUG, INFO, StreamHandler, basicConfig, getLogger +from logging import DEBUG, INFO, basicConfig, getLogger from typing import Optional, Union import sounddevice as sd diff --git a/whisper_streaming/transcriber.py b/whisper_streaming/transcriber.py index c037004..05c0ff0 100644 --- a/whisper_streaming/transcriber.py +++ b/whisper_streaming/transcriber.py @@ -1,11 +1,10 @@ #!/usr/bin/env python3 -from logging import INFO, getLogger +from logging import getLogger from typing import Iterator, List, Optional, Union import numpy as np import torch -from transformers.utils.dummy_pt_objects import OPT_PRETRAINED_MODEL_ARCHIVE_LIST from whisper import Whisper, load_model from whisper.audio import ( HOP_LENGTH, @@ -255,5 +254,6 @@ class WhisperStreamingTranscriber: if rest_start is None: return + logger.debug(f"rest_start={rest_start}") self.buffer_mel = mel[:, :, rest_start:] del mel