Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

音频格式转换时出错,TypeError: check_argument_types() missing 1 required positional argument: 'func' #64

Open
ingale726 opened this issue Jun 19, 2023 · 1 comment

Comments

@ingale726
Copy link

2023-06-19 14:08:44,582 - modelscope - INFO - Use user-specified model revision: v1.0.5
2023-06-19:14:08:44, INFO [api.py:470] Use user-specified model revision: v1.0.5
Downloading: 100%|████████████████████████████████████████████████████████████████████████████████████| 1.02G/1.02G [00:33<00:00, 32.5MB/s]
Downloading: 100%|████████████████████████████████████████████████████████████████████████████████████| 6.27k/6.27k [00:00<00:00, 1.16MB/s]
2023-06-19:14:09:30, INFO [auto_label.py:91] ---  New folder /data/audio/ptts_spk0_autolabel/paragraph/prosody...  ---
2023-06-19:14:09:30, INFO [auto_label.py:92] ---  OK  ---
2023-06-19:14:09:30, INFO [auto_label.py:91] ---  New folder /data/audio/ptts_spk0_autolabel/sp_interval...  ---
2023-06-19:14:09:30, INFO [auto_label.py:92] ---  OK  ---
2023-06-19:14:09:30, INFO [auto_label.py:91] ---  New folder /data/audio/ptts_spk0_autolabel/wav...  ---
2023-06-19:14:09:30, INFO [auto_label.py:92] ---  OK  ---
2023-06-19:14:09:30, INFO [auto_label.py:91] ---  New folder /data/audio/ptts_spk0_autolabel/log...  ---
2023-06-19:14:09:30, INFO [auto_label.py:92] ---  OK  ---
2023-06-19:14:09:30, INFO [auto_label.py:301] 2023-06-19 14:09:30
2023-06-19:14:09:30, INFO [auto_label.py:355] wav_preprocess start...
---  new folder...  ---
---  OK  ---
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:00<00:00, 128.04it/s]
2023-06-19:14:09:30, INFO [auto_label.py:367] wav cut by vad start...
Traceback (most recent call last):
  File "/data/audio/tran.py", line 8, in <module>
    ret, report = run_auto_label(input_wav = input_wav,
  File "/data/soft/anaconda3/envs/audio/lib/python3.9/site-packages/modelscope/tools/speech_tts_autolabel.py", line 78, in run_auto_label
    ret_code, report = auto_labeling.run()
  File "/data/soft/anaconda3/envs/audio/lib/python3.9/site-packages/tts_autolabel/auto_label.py", line 765, in run
    self.wav_cut_by_vad()
  File "/data/soft/anaconda3/envs/audio/lib/python3.9/site-packages/tts_autolabel/auto_label.py", line 371, in wav_cut_by_vad
    vad_cut(self.resample_wav_dir, self.cut_wav_dir, self.resource_dir)
  File "/data/soft/anaconda3/envs/audio/lib/python3.9/site-packages/tts_autolabel/audiocut/vad.py", line 55, in vad_cut
    vad_pipeline = Fsmn_vad(vad_model_dir)
  File "/data/soft/anaconda3/envs/audio/lib/python3.9/site-packages/tts_autolabel/audio2phone/funasr_onnx/vad_bin.py", line 62, in __init__
    self.frontend = WavFrontend(
  File "/data/soft/anaconda3/envs/audio/lib/python3.9/site-packages/tts_autolabel/audio2phone/funasr_onnx/utils/frontend.py", line 32, in __init__
    check_argument_types()
TypeError: check_argument_types() missing 1 required positional argument: 'func'

########################################################################################
使用的代码是:

# 导入run_auto_label工具, 初次运行会下载相关库文件
from modelscope.tools import run_auto_label
# 运行 autolabel进行自动标注,20句音频的自动标注约4分钟
import os 

input_wav = '/mnt/workspace/Data/ptts_spk0_wav' # wav audio path
work_dir = '/mnt/workspace/Data/ptts_spk0_autolabel' # output path
os.makedirs(work_dir, exist_ok=True)

ret, report = run_auto_label(input_wav = input_wav,
                             work_dir = work_dir,
                            resource_revision='v1.0.5')
print(report)
@ingale726 ingale726 changed the title 音频格式转换时出错 音频格式转换时出错,TypeError: check_argument_types() missing 1 required positional argument: 'func' Jun 19, 2023
@ingale726
Copy link
Author

pip install typeguard==2.13.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant