Skip to main content
POST
/
audio
/
translations
JavaScript
import SambaNova from 'sambanova';

const client = new SambaNova({
  apiKey: 'My API Key',
});

const translation = await client.audio.translations.create({
  file: fs.createReadStream('path/to/file'),
  model: 'Whisper-Large-v3',
});

console.log(translation);
{
  "text": "It's a sound effect of a bell chiming, specifically a church bell."
}

Authorizations

Authorization
string
header
required

SambaNova API Key

Body

multipart/form-data

Audio to translate and parameters

Translation request object

model
required

The model ID to use See available models

file
file
required

The audio file object to transcribe or translate, in one of these formats: FLAC, MP3, MP4, MPEG, MPGA, M4A, Ogg, WAV, or WebM format. File size limit is 25MB.

prompt
string | null

Optional text prompt provided to influence transcription Translation style or vocabulary. Example: “Please transcribe carefully, including pauses and hesitations.”

language
enum<string> | null

Optional language of the input audio. Supplying the input language in ISO-639-1 (e.g. en) format will improve accuracy and latency.

Available options:
en,
zh,
de,
es,
ru,
ko,
fr,
ja,
pt,
tr,
pl,
ca,
nl,
ar,
sv,
it,
id,
hi,
fi,
vi,
he,
uk,
el,
ms,
cs,
ro,
da,
hu,
ta,
no,
th,
ur,
hr,
bg,
lt,
la,
mi,
ml,
cy,
sk,
te,
fa,
lv,
bn,
sr,
az,
sl,
kn,
et,
mk,
br,
eu,
is,
hy,
ne,
mn,
bs,
kk,
sq,
sw,
gl,
mr,
pa,
si,
km,
sn,
yo,
so,
af,
oc,
ka,
be,
tg,
sd,
gu,
am,
yi,
lo,
uz,
fo,
ht,
ps,
tk,
nn,
mt,
sa,
lb,
my,
bo,
tl,
mg,
as,
tt,
haw,
ln,
ha,
ba,
jw,
su,
yue
response_format
enum<string>
default:json

Output format JSON or text.

Available options:
json,
text
stream
boolean
default:false

Enables streaming responses.

stream_options
object | null

Optional settings that apply when stream is true.

Response

Successful Response

  • Translation Response
  • Translation Stream Response

Translation response json object

text
string
required

audio file english text translation

I