[Python] converting 8khz to 16khz python libaries/methods

Discussão em 'Python' iniciado por Stack, Abril 7, 2025.

  1. Stack

    Stack Membro Participativo

    I have to upsample 8khz telephony audio to 16khz. Until now I'm using this code/very simple transformation :

    from scipy import signal

    input_rate = 8000
    wished_rate = 16000

    audio_array = np.fromstring(string=string_of_bytes, dtype=np.int16)
    resample_size = int(len(audio_array) / input_rate * wished_rate )
    resample = signal.resample(audio_array, resample_size)


    I'm getting 16000hz audio but in very low quality. Does anybody know which library or methods could handle this upsampling better?

    Continue reading...

Compartilhe esta Página