OpenAI推出语音转文本翻译Whisper API

OpenAI推出语音转文本翻译Whisper API

OpenAI推出语音转文本翻译Whisper API

  随着 ChatGPT API 的推出,OpenAI 今天推出了 Whisper API,这是该公司 9 月份发布的开源 Whisper 语音转文本模型的托管版本。语音转文本 API 提供两个端点,transcriptions 以及 translations,基于我们最先进的开源大型 v2 Whisper 模型。它们可用于:

  • 将音频转录成音频所使用的任何语言。
  • 将音频翻译并转录成英文。
OpenAI推出语音转文本翻译Whisper API
OpenAI推出语音转文本翻译Whisper API

  Whisper 是一种自动语音识别系统,OpenAI 声称它可以“稳健”地转录多种语言,并将这些语言翻译成英语。文件上传目前限制为 25 MB,Whisper 的价格为每分钟 0.006 美元,它接受多种格式的文件,包括 M4A、MP3、MP4、MPEG、MPGA、WAV 和 WEBM。Whisper 的不同之处在于,它接受了从网络收集的 680,000 小时多语言和“多任务”数据的训练,从而提高了对独特口音、背景噪音和技术术语的识别能力。本文晓得博客为你介绍OpenAI推出语音转文本翻译Whisper API。

  推荐:如何使用ChatGPT API

Whisper局限性

  Whisper 有其局限性,尤其是在“下一个词”预测领域,由于该系统是在大量嘈杂数据上训练的,

  OpenAI Whisper 可能会在其转录中包含实际上没有说过的单词,可能是因为它既要预测音频中的下一个单词,又要转录录音本身。此外,Whisper 在不同语言中的表现并不相同,当涉及到训练数据中没有很好代表的语言的使用者时,它的错误率更高。

  尽管如此,OpenAI 还是看到了 Whisper 的转录功能被用于改进现有的应用程序、服务、产品和工具。AI 驱动的语言学习应用程序 Speak 已经在使用 Whisper API 为新的应用程序内虚拟语音伴侣提供支持。

  推荐:ChatGPT API 接口免费吗

Whisper API支持的语言

  Whisper API 目前通过和端点支持以下语言:

南非荷兰语、阿拉伯语、亚美尼亚语、阿塞拜疆语、白俄罗斯语、波斯尼亚语、保加利亚语、加泰罗尼亚语、中文、克罗地亚语、捷克语、丹麦语、
荷兰语、英语、爱沙尼亚语、芬兰语、法语、加利西亚语、德语、希腊语、希伯来语、印地语、匈牙利语、冰岛语、印度尼西亚语、意大利语、日语、
卡纳达语、哈萨克语、韩语、拉脱维亚语、立陶宛语、马其顿语、马来语、马拉地语、毛利语、尼泊尔语、挪威语、波斯语、
波兰语、葡萄牙语、罗马尼亚语、俄语、塞尔维亚语、斯洛伐克语、斯洛文尼亚语、西班牙语、斯瓦希里语、瑞典语、他加禄语、泰米尔语、泰语、
土耳其语、乌克兰语、乌尔都语、越南语和威尔士语

  推荐:什么是ChatGPT Plus

在Python中使用Whisper API

OpenAI推出语音转文本翻译Whisper API
OpenAI推出语音转文本翻译Whisper API
# Note: you need to be using OpenAI Python v0.27.0 for the code below to work

import os
import openai

openai.api_key = "OPENAI_API_KEY"
audio_file = open("/Users/PycharmProjects/untitled2/1-Minute -Ted-Talk.mp3.mp3", "rb")
transcript = openai.Audio.transcribe("whisper-1", audio_file)
print(transcript)

  输出的内容为响应类型将是包含原始文本的 json,如下所示:

{
  "text": "You know, rather than be scared by a jobless future, I started to rethink it and I said, I could really be excited by a jobless future because I can finally see a day in under 50 years when people don't have to work for pay because humans have labored for thousands of years, slaves to their work primarily in most of the world and soon, they'll be able to do what they wanted to do, what they were born to do before someone came along and said, stop doing that, you gotta go earn a living. This is a whole new renaissance that we may be able to see actually in our lifetime where humans can do what they were born to do like art and dance and music and invention and caring for others and whatever it is that you wanna do. Now, there'll be fits and starts, there'll be politics that get in the way. This is no utopia, no, it is a utopia actually, come to think of it, and working together towards this goal, this is actually a great idea when we look at it from this vantage point."
}

  注意:需要安装Python OpenAI v0.27.0 才能使代码正常工作。

  推荐:国内注册ChatGPT的方法(100%可用)

总结

  以上是晓得博客为你介绍的OpenAI推出语音转文本翻译Whisper API的全部内容,Whisper 价格为每分钟 0.006 美元,接受多种格式的文件,希望对你的 ChatGPT 学习有所帮助,如有问题,欢迎联系我们。

  推荐:如何在WhatsApp中使用ChatGPT

  推荐:ChatGPT教程

5/5 - (1 vote)

晓得博客,版权所有丨如未注明,均为原创
晓得博客 » OpenAI推出语音转文本翻译Whisper API

转载请保留链接:https://www.pythonthree.com/openai-whisper-api/

Claude、Netflix、Midjourney、ChatGPT Plus、PS、Disney、Youtube、Office 365、多邻国Plus账号购买,ChatGPT API购买,优惠码XDBK,用户购买的时候输入优惠码可以打95折

Chatgpt-Plus注册购买共享账号
滚动至顶部