Recorded analysis

Analyze uploaded audio files, Buffers, raw PCM, or HTTPS URLs for turns, speakers, acoustics, and IPA phonetics.

POST/v1/analyze/audioMultipart file upload
POST/v1/analyze/urlRemote HTTPS audio

Upload a recording or point the API at an HTTPS URL. In one call you receive the full transcript, diarized speaker turns, physical voice measurements, speaker-relative changes, and significant state moments.

import { ProsodyClient } from '@prosodyai/sdk';

const prosody = new ProsodyClient();

// Local path (.wav, .mp3, .m4a, .flac, .ogg), Buffer, Uint8Array, Blob, or HTTPS URL
const result = await prosody.transcribe('./call.wav');

for (const turn of result.turns) {
  console.log(
    turn.speaker.label,
    turn.startMs,
    turn.text,
    turn.prosody?.state.intonation.pitch,
  );
}

When you pass a local file path, the SDK preserves its filename extension so the server decodes .wav, .mp3, .m4a, .flac, and .ogg accurately. When you pass an http:// or https:// URL, the SDK routes the request through POST /v1/analyze/url.

Response fields

FieldTypeDescription
textstringFull transcript text
turnsTranscribeTurn[]Speaker-attributed turns with timestamps and prosody
speakersSpeaker[]Each discovered voice with talk time, share, and baseline state
framesVoiceFrame[]Chronological frame-level state, change, and affect
momentsMoment[]Committed state-delta moments ordered by descending magnitude
vadAffectVad | nullCall-level valence, arousal, and dominance when available
conversationConversationUnderlying state container for trajectories and custom queries

Reading turns and speaker baselines

const [turn] = result.turns;
turn.prosody?.state.intonation.pitch;    // median F0, Hz
turn.prosody?.state.intonation.range;    // F0 span, semitones
turn.prosody?.state.stress.loudness;     // dBFS
turn.prosody?.state.rhythm.voiced;       // 0 to 1
turn.prosody?.state.rhythm.pause;        // 0 to 1
turn.prosody?.change?.stress.loudness;   // dB vs this speaker's baseline

const [speaker] = result.speakers;
speaker.label;                           // "Speaker 1"
speaker.talkSeconds;                     // 142.5
speaker.state.intonation.pitch?.median;  // baseline F0, Hz
result.turnsBySpeaker(speaker);          // all turns for this voice

Raw analysis and measurement series

Use prosody.analyze() when you want the raw wire payload alongside the SDK's voiceFrames() and measurementSeries() helpers:

import { ProsodyClient, voiceFrames, measurementSeries } from '@prosodyai/sdk';

const prosody = new ProsodyClient();
const raw = await prosody.analyze('./call.wav');

const frames = voiceFrames(raw);
const pitchSeries = measurementSeries(raw, 'intonation.pitch');
const loudnessSeries = measurementSeries(raw, 'stress.loudness');

You can also submit raw PCM samples directly without building a WAV container yourself:

const raw = await prosody.analyzePCM(int16Samples, { sampleRate: 16_000 });

Acoustic IPA phonetics

POST/v1/phonetics/ipaTimed IPA segments

prosody.ipa() decodes what the audio sounded like into timed IPA symbols directly from the acoustic stream:

const phonetics = await prosody.ipa('./word.wav');

console.log(phonetics.ipa);
for (const seg of phonetics.segments) {
  console.log(seg.ipa, seg.start_s, seg.end_s);
}

On this page