web模式合成的时候会提示
File "C:\Users\kent.conda\envs\py39\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "C:\Users\kent\AppData\Local\Temp\tmp41wtvgs9.py", line 13, in
render_streamlit_ui()
File "D:\MockingBird-main\control\mkgui\base\ui\streamlit_ui.py", line 909, in render_streamlit_ui
session_state.output_data = opyrator(input=input_data_obj)
File "D:\MockingBird-main\control\mkgui\base\core.py", line 203, in call
return self.function(input_obj, **kwargs)
File "D:\MockingBird-main\control\mkgui\app.py", line 125, in synthesize
encoder_wav = encoder.preprocess_wav(wav, sample_rate)
File "D:\MockingBird-main\models\encoder\audio.py", line 48, in preprocess_wav
wav = trim_long_silences(wav)
File "D:\MockingBird-main\models\encoder\audio.py", line 102, in trim_long_silences
audio_mask = np.round(audio_mask).astype(np.bool)
File "C:\Users\kent.conda\envs\py39\lib\site-packages\numpy__init.py", line 305, in getattr
raise AttributeError(former_attrs_[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
np.bool was a deprecated alias for the builtin bool. To avoid this error in existing code, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Summary[问题简述(一句话)] python3.9 运行 demo_toolbox.py 毫无反应 就最新版本的 web界面模式合成也会报错。
Env & To Reproduce[复现与环境] py3.9.12
Screenshots[截图(如有)]
web模式合成的时候会提示 File "C:\Users\kent.conda\envs\py39\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in _run_script exec(code, module.dict) File "C:\Users\kent\AppData\Local\Temp\tmp41wtvgs9.py", line 13, in
render_streamlit_ui()
File "D:\MockingBird-main\control\mkgui\base\ui\streamlit_ui.py", line 909, in render_streamlit_ui
session_state.output_data = opyrator(input=input_data_obj)
File "D:\MockingBird-main\control\mkgui\base\core.py", line 203, in call
return self.function(input_obj, **kwargs)
File "D:\MockingBird-main\control\mkgui\app.py", line 125, in synthesize
encoder_wav = encoder.preprocess_wav(wav, sample_rate)
File "D:\MockingBird-main\models\encoder\audio.py", line 48, in preprocess_wav
wav = trim_long_silences(wav)
File "D:\MockingBird-main\models\encoder\audio.py", line 102, in trim_long_silences
audio_mask = np.round(audio_mask).astype(np.bool)
File "C:\Users\kent.conda\envs\py39\lib\site-packages\numpy__init.py", line 305, in getattr
raise AttributeError(former_attrs_[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
np.bool
was a deprecated alias for the builtinbool
. To avoid this error in existing code, usebool
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool` here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations