OpenVoice icon indicating copy to clipboard operation
OpenVoice copied to clipboard

gr.Audio() got an unexpected keyword argument 'info'

Open Datou opened this issue 8 months ago • 6 comments

after run python -m openvoice_app --share, i got this:

Loaded checkpoint 'checkpoints/base_speakers/EN/checkpoint.pth' missing/unexpected keys: [] [] Loaded checkpoint 'checkpoints/base_speakers/ZH/checkpoint.pth' missing/unexpected keys: [] [] Loaded checkpoint 'checkpoints/converter/checkpoint.pth' missing/unexpected keys: [] [] F:\OpenVoice\installer_files\env\lib\site-packages\gradio\components\dropdown.py:90: UserWarning: The max_choices parameter is ignored when multiselect is False. warnings.warn( Traceback (most recent call last): File "F:\OpenVoice\installer_files\env\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "F:\OpenVoice\installer_files\env\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "F:\OpenVoice\openvoice_app.py", line 267, in ref_gr = gr.Audio( File "F:\OpenVoice\installer_files\env\lib\site-packages\gradio\component_meta.py", line 157, in wrapper return fn(self, **kwargs) TypeError: init() got an unexpected keyword argument 'info'

Datou avatar Jan 03 '24 13:01 Datou

me too

midpoint avatar Jan 03 '24 13:01 midpoint

I was able to run python openvoice_app.py after making the changes presented in the @KChalermdit 's pull request. To be more precise, you need to delete the info argument in the ref_gr and mic_gr variables after installing langid library.

overklassniy avatar Jan 03 '24 15:01 overklassniy

Gradio with version 3.48.0 works well (the default version on HuggingFace Space).

Resolve the issue by executing the following command:

pip install --upgrade gradio==3.48.0

This should resolve the problem without requiring any modifications to the Gradio code in openvoice_app.py.

We have already specified the exact version of Gradio in the requirements file.

yuxumin avatar Jan 03 '24 15:01 yuxumin

Try to run with proxy.

lzsnolimit avatar Jan 04 '24 10:01 lzsnolimit

Gradio with version 3.48.0 works well (the default version on HuggingFace Space).

Resolve the issue by executing the following command:

pip install --upgrade gradio==3.48.0

This should resolve the problem without requiring any modifications to the Gradio code in openvoice_app.py.

We have already specified the exact version of Gradio in the requirements file.

I have also encountered the unexpected keys messages - following your post, I did the gradio version install, but the errors are still there - they are exactly the same as the OP example, with each message coming after the checkpoints loading

davechilds avatar Jan 04 '24 12:01 davechilds

The following output is a normal information indicating that the checkpoint has been successfully loaded

Loaded checkpoint 'checkpoints/base_speakers/EN/checkpoint.pth'
missing/unexpected keys: [] []
Loaded checkpoint 'checkpoints/base_speakers/ZH/checkpoint.pth'
missing/unexpected keys: [] []
Loaded checkpoint 'checkpoints/converter/checkpoint.pth'
missing/unexpected keys: [] []

The real issue with this problem lies in the following.

File "F:\OpenVoice\openvoice_app.py", line 267, in
ref_gr = gr.Audio(
File "F:\OpenVoice\installer_files\env\lib\site-packages\gradio\component_meta.py", line 157, in wrapper
return fn(self, **kwargs)
TypeError: init() got an unexpected keyword argument 'info'

I have already modified the title of the issue to ensure that others can accurately identify the real problem with this issue.

yuxumin avatar Jan 04 '24 12:01 yuxumin