In use
formants = wave.formants_slidingwindow() f1, f2 = formants[0], formants[1]
Will report an error
features = features_augmentation_selection(wave, wave_path, speaker) File "D:\程序\CGAN-main\units\data_utils.py", line 131, in features_augmentation_selection formants = wave.formants_slidingwindow() File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\sound.py", line 773, in formants_slidingwindow ) for f in ["f1", "f2", "f3", "f4"] File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\sound.py", line 773, in <listcomp> ) for f in ["f1", "f2", "f3", "f4"] File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\formants.py", line 91, in get_formants_slidingwindow return new_get_unique_formant(waveform, sample_rate, formant) File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\utils.py", line 42, in wrapper value = func(*new_args) File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\formants.py", line 89, in new_get_unique_formant return get_unique_formant(waveform, sample_rate, formant) File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\formants.py", line 64, in get_unique_formant dict_out = get_formants(waveform, sample_rate) File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\formants.py", line 51, in get_formants myformants = estimate_formants_lpc(waveform, sample_rate) File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\formants.py", line 32, in estimate_formants_lpc lpc_rep = lpc(x_filt, 2 + int(sample_rate / 1000)) File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\librosa\core\audio.py", line 882, in lpc return __lpc(y, order) TypeError: expected dtype object, got 'numpy.dtype[float64]'
In use
formants = wave.formants_slidingwindow() f1, f2 = formants[0], formants[1]
Will report an error
features = features_augmentation_selection(wave, wave_path, speaker) File "D:\程序\CGAN-main\units\data_utils.py", line 131, in features_augmentation_selection formants = wave.formants_slidingwindow() File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\sound.py", line 773, in formants_slidingwindow ) for f in ["f1", "f2", "f3", "f4"] File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\sound.py", line 773, in <listcomp> ) for f in ["f1", "f2", "f3", "f4"] File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\formants.py", line 91, in get_formants_slidingwindow return new_get_unique_formant(waveform, sample_rate, formant) File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\utils.py", line 42, in wrapper value = func(*new_args) File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\formants.py", line 89, in new_get_unique_formant return get_unique_formant(waveform, sample_rate, formant) File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\formants.py", line 64, in get_unique_formant dict_out = get_formants(waveform, sample_rate) File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\formants.py", line 51, in get_formants myformants = estimate_formants_lpc(waveform, sample_rate) File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\surfboard\formants.py", line 32, in estimate_formants_lpc lpc_rep = lpc(x_filt, 2 + int(sample_rate / 1000)) File "D:\Anaconda3\envs\CGAN-main\lib\site-packages\librosa\core\audio.py", line 882, in lpc return __lpc(y, order) TypeError: expected dtype object, got 'numpy.dtype[float64]'
Please help me, thank you