from openai import OpenAI client = OpenAI() audio_file = open("/path/to/file/speech.mp3", "rb") transcription = client.audio.transcriptions.create( model="whisper-1", file=audio_file, response_format="text" ) print(transcription.text) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. API...
While the underlying model was trained on 98 languages, we only list the languages that exceeded <50%word error rate(WER) which is an industry standard benchmark for speech to text model accuracy. The model will return results for languages not listed above but the quality will be low. 虽然...
python from openai import OpenAI client = OpenAI() audio_file = open("/path/to/file/speech.mp3", "rb") transcription = client.audio.transcriptions.create( model="whisper-1", file=audio_file, response_format="text" ) print(transcription.text) API 参考包括可用参数的完整列表。 翻译 翻译API ...
pythonfromopenaiimportOpenAI client = OpenAI() audio_file =open("/path/to/file/speech.mp3","rb") transcription = client.audio.transcriptions.create( model="whisper-1", file=audio_file, response_format="text")print(transcription.text) API 参考包括可用参数的完整列表。 翻译 翻译API 接受任何支持...
final_filenamethe name to give to the final audio. Finally, we can use the function to download the video and convert it into audio. English transcription The video used here is a 30 seconds motivational speech onYouTube from Motivation Quickie. Only the first 17 s...
from openai import OpenAI client = OpenAI() audio_file= open("speech.mp3", "rb") transcription = client.audio.transcriptions.create( model="whisper-1", file=audio_file print(transcription.text) 我喜欢数据科学和机器学习。 还可以将音频文件翻译成英语。模型还无法翻译成另一种语言。
from openai import OpenAI client = OpenAI() speech_file_path = Path(__file__).parent / "speech.mp3" response = client.audio.speech.create( model="tts-1", voice="alloy", input="Today is a wonderful day to build something people love!" ...
3、论文的主要卖点很简洁:Speech通过加数据和加大模型,ASR系统可以Robust,不用那些预训练啥的花里胡哨...
Whisper is an open-source, multilingual, general-purpose speech recognition model by OpenAI. It needs only three lines of code to transcribe an (mp3) audio file. A quick comparison with Vosk (another open-source toolkit) has shown that Whisper transcribes the audio of a podcast excerpt slightl...
from openai import OpenAI client = OpenAI() audio_file= open("speech.mp3", "rb") transcription = client.audio.transcriptions.create( model="whisper-1", file=audio_file ) print(transcription.text) 1. 2. 3. 4. 5. 6. 7. 8.