Skip to content

16k sample rate audio error #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zhang-jian opened this issue Sep 27, 2018 · 1 comment
Open

16k sample rate audio error #14

zhang-jian opened this issue Sep 27, 2018 · 1 comment

Comments

@zhang-jian
Copy link

Sorry if this question is too naive.

Can I use this tool on 16k sample rate audios? I am trying to run the demo code on a 16k sample rate audio and got error

user@localhost:~/Downloads/magphase-master/demos$ python demo_copy_synthesis_lossless.py
Analysing.....................................................
Extracting epochs with REAPER...
Residual symmetry: P:7371.288574  N:7185.912109  MEAN:-840.706116
Inverting signal
Traceback (most recent call last):
  File "demo_copy_synthesis_lossless.py", line 71, in 
    m_mag, m_real, m_imag, v_f0, fs, v_shift = mp.analysis_lossless(wav_file_orig)
  File "/home/user/Downloads/magphase-master/src/magphase.py", line 2891, in analysis_lossless
    m_fft, v_shift = analysis_with_del_comp_from_pm(v_sig, fs, v_pm_smpls, fft_len=fft_len)
  File "/home/user/Downloads/magphase-master/src/magphase.py", line 291, in analysis_with_del_comp_from_pm
    l_frms, v_lens, v_pm_plus, v_shift, v_rights = windowing(v_in_sig, v_pm_smpls_defi, win_func=win_func)
  File "/home/user/Downloads/magphase-master/src/magphase.py", line 108, in windowing
    v_frm = v_frm * v_win
ValueError: operands could not be broadcast together with shapes (217,) (421,) 

Thanks,

@Howliang
Copy link

Yes, MagPhase can work with 16kHz audios. If you look at src/magphase.py, you will find it supports 16000, 22050, 44100, 48000 sample frequency.
Parameters need to be tuned if synthesized quality sounds dramatically poor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants