Skip to main content

transcribeAudio

chainalign-backend


chainalign-backend / speech / transcribeAudio

Function: transcribeAudio()

transcribeAudio(audioBytes, encoding, sampleRateHertz, languageCode): Promise<string>

Defined in: speech.js:14

Transcribes audio data using Google Cloud Speech-to-Text.

Parameters

audioBytes

Buffer<ArrayBufferLike>

The audio data as a Buffer.

encoding

string

The encoding of the audio (e.g., 'LINEAR16').

sampleRateHertz

number

The sample rate of the audio (e.g., 16000).

languageCode

string

The language code (e.g., 'en-US').

Returns

Promise<string>

The transcription of the audio.