babysor / babysor/MockingBird

python3.9 运行 demo_toolbox.py 毫无反应。 web界面模式合成也会报错。

Open
#897 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
36.9k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

**Summary[问题简述(一句话)]**
python3.9 运行 demo_toolbox.py 毫无反应 就最新版本的 web界面模式合成也会报错。

**Env & To Reproduce[复现与环境]**
py3.9.12

**Screenshots[截图(如有)]**
![微信图片_20230514181152](https://github.com/babysor/MockingBird/assets/55339757/6d32f980-a2bc-47ad-b463-2338a5b3e3bc)

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at models/encoder/audio.py in trim_long_silences, where the traceback identifies the failing NumPy boolean conversion. Trace the call from control/mkgui/app.py through control/mkgui/base/ui/streamlit_ui.py, then run demo_toolbox.py or the web synthesis mode under Python 3.9. Done means synthesis no longer stops at the reported NumPy attribute error.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python, streamlit
Domain
ai, web-dev
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.