fix import module dependency
| | |
| | | ): |
| | | |
| | | from funasr.tasks.whisper import ASRTask |
| | | from funasr.utils.whisper_utils.transcribe import transcribe |
| | | from funasr.utils.whisper_utils.audio import pad_or_trim, log_mel_spectrogram |
| | | from funasr.utils.whisper_utils.decoding import DecodingOptions, detect_language, decode |
| | | |
| | | # 1. Build ASR model |
| | | scorers = {} |
| | |
| | | |
| | | """ |
| | | |
| | | from funasr.utils.whisper_utils.transcribe import transcribe |
| | | from funasr.utils.whisper_utils.audio import pad_or_trim, log_mel_spectrogram |
| | | from funasr.utils.whisper_utils.decoding import DecodingOptions, detect_language, decode |
| | | |
| | | speech = speech[0] |
| | | speech = pad_or_trim(speech) |
| | | mel = log_mel_spectrogram(speech).to(self.device) |