Audio Translations
Looking for transcriptions? See Audio Transcriptions, or learn about the difference between translations and transcriptions below.
Currently, audio can only be translated into English.
Audio translation converts spoken language from an audio recording into written text in another language. Common uses include:
- Converting user-uploaded audio in diverse languages into text in a single language.
- Translating interviews, lectures, and meetings for journalists, students, researchers, and professionals.
- Powering voice assistants that understand and respond to commands in different languages.
- Providing instant translations of spoken exercises in language-learning applications.
- Automatically generating subtitles for movies, shows, and online videos.
Audio translations are served by OpenAI models through the endpoint below.
Request
URL: https://ai.purlabs.xyz/openai/audio/translations
Request Method: POST
TS Request Interface
interface Request {
file: string;
model: string;
prompt?: string;
response_format?: string;
temperature?: number;
}Request API Reference
| Property | Type | Required | Description |
|---|---|---|---|
file | File | Required | The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. |
model | string | Required | ID of the model to use. Only whisper-1 is currently available. |
prompt | string | Optional | An optional text to guide the model’s style or continue a previous audio segment. The prompt should match the audio language. |
response_format | string | Optional | Defaults to json. The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt. |
temperature | number | Optional | Defaults to 0. The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit. |
Example JSON Request Body
{
"file": "https://my-audio-sample.com/audio.mp3",
"model": "whisper-1",
}Response
TS Response Interface
interface Response {
text: string;
};Example JSON Response
{
"text": "Good morning everyone, and welcome to today's presentation on renewable energy."
}
Transcriptions vs Translations
| Aspect | Audio Transcriptions | Translations |
|---|---|---|
| Definition | Conversion of spoken language from audio to text. | Conversion of written text from one language to another while maintaining its meaning. |
| Purpose | Provides a written record of spoken content. | Enables understanding of content across different languages and cultures. |
| Output Format | Textual representation of spoken words. | Textual representation of content in another language. |
| Accessibility | Enhances access for people with hearing impairments. | Bridges communication gaps for non-native speakers. |
| Indexing | Improves search engine visibility through text. | Expands content’s reach to global audiences. |
| Use Cases | Podcasts, interviews, meetings, content repurposing. | Localization, global communication, reaching diverse audiences. |
| Process | Typing out spoken words heard in an audio recording. | Converting written content from one language to another, considering cultural nuances. |
| Skill Required | Accurate listening and transcription abilities. | Bilingual proficiency, cultural understanding, and language skills. |
| Tools | Manual transcription or automated speech recognition software. | Human translators or machine translation tools. |
| Output Utility | Provides a readable version of audio content. | Enables comprehension and engagement with content regardless of language barriers. |
Last updated on