数据类型不支持
`Traceback (most recent call last):
File "D:\VSA\py310\lib\site-packages\soundfile.py", line 1328, in _check_dtype
return _ffi_types[dtype]
KeyError: 'float16'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\VSA\py310\lib\site-packages\flask\app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
File "D:\VSA\py310\lib\site-packages\flask\app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "D:\VSA\py310\lib\site-packages\flask\app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "D:\VSA\py310\lib\site-packages\flask\app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(*view_args)
File "D:\VSA\tts_app\voice_api\auth.py", line 10, in check_api_key
return func(args, **kwargs)
File "D:\VSA\tts_app\voice_api\views.py", line 655, in voice_gpt_sovits_api
audio = tts_manager.gpt_sovits_infer(state)
File "D:\VSA\manager\TTSManager.py", line 482, in gpt_sovits_infer
return self.encode(sampling_rate, audio, state["format"]) if encode else audio
File "D:\VSA\manager\TTSManager.py", line 74, in encode
sf.write(f, audio, sampling_rate, format="wav")
File "D:\VSA\py310\lib\site-packages\soundfile.py", line 345, in write
f.write(data)
File "D:\VSA\py310\lib\site-packages\soundfile.py", line 1020, in write
written = self._array_io('write', data, len(data))
File "D:\VSA\py310\lib\site-packages\soundfile.py", line 1341, in _array_io
ctype = self._check_dtype(array.dtype.name)
File "D:\VSA\py310\lib\site-packages\soundfile.py", line 1330, in _check_dtype
raise ValueError("dtype must be one of {0!r} and not {1!r}".format(
ValueError: dtype must be one of ['float32', 'float64', 'int16', 'int32'] and not 'float16'
2024-09-03 23:41:23 [INFO] 192.168.1.15 - - [03/Sep/2024 23:41:23] "POST /voice/gpt-sovits HTTP/1.1" 500 - [in _internal._log:187]`
运行环境
问题描述
数据类型不支持 `Traceback (most recent call last): File "D:\VSA\py310\lib\site-packages\soundfile.py", line 1328, in _check_dtype return _ffi_types[dtype] KeyError: 'float16'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\VSA\py310\lib\site-packages\flask\app.py", line 2528, in wsgi_app response = self.full_dispatch_request() File "D:\VSA\py310\lib\site-packages\flask\app.py", line 1825, in full_dispatch_request rv = self.handle_user_exception(e) File "D:\VSA\py310\lib\site-packages\flask\app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() File "D:\VSA\py310\lib\site-packages\flask\app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(*view_args) File "D:\VSA\tts_app\voice_api\auth.py", line 10, in check_api_key return func(args, **kwargs) File "D:\VSA\tts_app\voice_api\views.py", line 655, in voice_gpt_sovits_api audio = tts_manager.gpt_sovits_infer(state) File "D:\VSA\manager\TTSManager.py", line 482, in gpt_sovits_infer return self.encode(sampling_rate, audio, state["format"]) if encode else audio File "D:\VSA\manager\TTSManager.py", line 74, in encode sf.write(f, audio, sampling_rate, format="wav") File "D:\VSA\py310\lib\site-packages\soundfile.py", line 345, in write f.write(data) File "D:\VSA\py310\lib\site-packages\soundfile.py", line 1020, in write written = self._array_io('write', data, len(data)) File "D:\VSA\py310\lib\site-packages\soundfile.py", line 1341, in _array_io ctype = self._check_dtype(array.dtype.name) File "D:\VSA\py310\lib\site-packages\soundfile.py", line 1330, in _check_dtype raise ValueError("dtype must be one of {0!r} and not {1!r}".format( ValueError: dtype must be one of ['float32', 'float64', 'int16', 'int32'] and not 'float16' 2024-09-03 23:41:23 [INFO] 192.168.1.15 - - [03/Sep/2024 23:41:23] "POST /voice/gpt-sovits HTTP/1.1" 500 - [in _internal._log:187]`
问题复现步骤 使用gpt-sovits进行语音合成。