Speech to text realtime

deepgram-flux-multi

Live multilingual Flux. $0.0078 per minute.

The call is Pascal’s. Send Authorization: Bearer with a Pascal key, and Pascal’s body: model, the file or the text, and params. Inside params, a Pascal name and the provider’s own name are both accepted. If both are sent and they disagree, the request is rejected. The provider’s SDK and host are not this API. The API request fee is not charged. A studio call needs a Creator plan or an API balance.

Native stream: PCM16 mono, or μ-law or A-law. Default 16000 Hz linear16. language is sent to Flux as language_hint.. Live price and availability are on GET /v1/models/deepgram-flux-multi.

  • Open wss://api.pascalai.co/v1/speech-to-text/realtime?model=deepgram-flux-multi.
  • $0.0078 per minute of audio.

Parameters

FieldTypeDescription
session.language_hintstring or arrayen, es, fr, de, hi, ru, pt, ja, it, nl. language is the same field.
session.eot_thresholdnumberEnd-of-turn confidence from 0.5 to 1.
session.sample_rate
Default 16000
integer8000, 16000, 24000, 44100, or 48000. Omit it and the rate is 16000 Hz. The bytes have to already be that rate. A live frame has no header, so a mismatch is still accepted and the transcript can come out degraded.
session.encoding
Default linear16
stringlinear16, mulaw, or alaw. Omit it for linear16.

Example

const socket = new WebSocket(
  'wss://api.pascalai.co/v1/speech-to-text/realtime?model=deepgram-flux-multi&api_key=' + key
);
socket.binaryType = 'arraybuffer';
socket.onopen = () => {
  socket.send(JSON.stringify({
    type: 'session.update',
    session: {
      language: 'auto',
      endpointing: 'manual',
    },
  }));
};
// binary Int16 PCM16 mono frames at session.sample_rate (default 16000)
// when endpointing is manual:
socket.send(JSON.stringify({ type: 'session.commit' }));
socket.send(JSON.stringify({ type: 'session.close' }));