Skip to main content

Translation API

This documentation is for the Translation API, which combines the STT API and the Translation API. Currently, only English to Japanese translation is supported.

note

This API is being deployed on a regional server in South Korea for demo purposes, so you may experience some latency depending on where you are using it.

Getting Started​

Endpoint​

caution

When using the API, user must send both the audio file that has been passed through the Beamforming SDK and the raw data from the dual microphones to use it properly.


POST https://api.translate.beam.deephearing.com/files/<FILE_TYPE>

Access Key​

info

The Access Key(X-API-KEY) must be written in the request header.

Send as PCM data​


POST https://api.translate.beam.deephearing.com/files/pcm

  • files : The raw PCM audio file and the PCM audio file that passed through the Beamforming SDK.

Required​

Raw audio from dual microphones

  • 2 Channel Stereo
  • 16,000Hz
  • Linear 16bit PCM Data

Audio processed by the Beamforming SDK

  • 1 Channel Mono
  • 16,000Hz
  • Linear 16bit PCM Data
caution

The filename must be set to bypass (raw audio) and beamformer (audio processed by the beamforming SDK).

curl --location 'https://api.translate.beam.deephearing.com/files/pcm' \
--header 'X-API-KEY: <ACCESS_TOKEN>' \
--form 'files=@"bypass"' \
--form 'files=@"beamformer"'

Send as WAV data​


POST https://api.translate.beam.deephearing.com/files/wav

  • files : The raw Wav audio file and the Wav audio file that passed through the Beamforming SDK.

Required​

Raw audio from dual microphones

  • 2 Channel Stereo
  • 16,000Hz
  • Wav Data

Audio processed by the Beamforming SDK

  • 1 Channel Mono
  • 16,000Hz
  • Wav Data
caution

.wav extension is required.

caution

The filename must be set to bypass.wav (raw audio) and beamformer.wav (audio processed by the beamforming SDK).

curl --location 'https://api.translate.beam.deephearing.com/files/wav' \
--header 'X-API-KEY: <ACCESS_TOKEN>' \
--form 'files=@"bypass.wav"' \
--form 'files=@"beamformer.wav"'

Get a response​

Success ✅​

{
result: <TRANSLATED_TEXT>
}
  • result : String

Error 🔴​

{
detail: <ERROR_MESSAGE>
}
  • detail : String