mirror of
https://github.com/shirayu/whispering.git
synced 2024-11-29 04:21:07 +00:00
Fix lint
This commit is contained in:
parent
3725694cbb
commit
8ea7b59eed
2 changed files with 3 additions and 4 deletions
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import queue
|
import queue
|
||||||
import sys
|
from logging import DEBUG, INFO, basicConfig, getLogger
|
||||||
from logging import DEBUG, INFO, StreamHandler, basicConfig, getLogger
|
|
||||||
from typing import Optional, Union
|
from typing import Optional, Union
|
||||||
|
|
||||||
import sounddevice as sd
|
import sounddevice as sd
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from logging import INFO, getLogger
|
from logging import getLogger
|
||||||
from typing import Iterator, List, Optional, Union
|
from typing import Iterator, List, Optional, Union
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
from transformers.utils.dummy_pt_objects import OPT_PRETRAINED_MODEL_ARCHIVE_LIST
|
|
||||||
from whisper import Whisper, load_model
|
from whisper import Whisper, load_model
|
||||||
from whisper.audio import (
|
from whisper.audio import (
|
||||||
HOP_LENGTH,
|
HOP_LENGTH,
|
||||||
|
@ -255,5 +254,6 @@ class WhisperStreamingTranscriber:
|
||||||
if rest_start is None:
|
if rest_start is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
logger.debug(f"rest_start={rest_start}")
|
||||||
self.buffer_mel = mel[:, :, rest_start:]
|
self.buffer_mel = mel[:, :, rest_start:]
|
||||||
del mel
|
del mel
|
||||||
|
|
Loading…
Reference in a new issue