Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/openai_deno/mod.ts>OpenAI#createTranslation

OpenAI API wrapper for deno.
Latest
method OpenAI.prototype.createTranslation
import { OpenAI } from "https://deno.land/x/openai_deno@v0.9.8/mod.ts";

Translates audio into into English.

Parameters

file: string | BlobPart

The audio file to translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.

model: string

ID of the model to use. Only whisper-1 is currently available.

optional
params: CreateTranslationParams

Optional parameters for the API.

optional
filename: string

Returns

The translation of the audio.