How to convert Telegram voice in a wave file in python

后端 未结 2 457
长发绾君心
长发绾君心 2021-01-25 02:34

I\'m trying to save a Telegram voice file in a wave audio file using soundfile library:

def ReceiveVoice(bot, update, user_data):

   voice = bot.getFile(update.         


        
2条回答
  •  我在风中等你
    2021-01-25 03:12

    Try this

    import soundfile as sf
    data, samplerate = sf.read(input_ogg)
    sf.write(output_wav, data, samplerate)
    

提交回复
热议问题