Easy Audio to Text using Python & OpenAI
HTML-код
- Опубликовано: 22 авг 2024
- In this tutorial, I demonstrate the process of converting an audio file into text format by using Python and the OpenAI speech-to-text engine. The focus will be on utilizing the OpenAI API to accurately transcribe and translate a single audio file in Python.
You will find the entire code for this tutorial in my github account. Use that link:
github.com/nae...
In this video, I was using a hold version of openai module. If you have installed and updated version, the openai.Audio.transcribe method that I used to create the transcript variable will not work. Instead use openai.audio.transcriptions.create . I updated the code in github. Feel free to access it via this link
github.com/naeljb/speech-to-text/blob/main/Transcribe%20audio%20in%20python%20with%20Whisper-1.ipynb
You can also check openai website for documentation at : platform.openai.com/docs/guides/speech-to-text/quickstart
Nice!
how to use audio link instead of file
Have you try to put the url link ?
# create a variable that provides the path of your audio file
audio_path = " include your URL link "