three.ws Audio

v0.1.3
io.github.nirholas/audio-mcp Checked 1 hour ago Published 1 month ago

Text-to-speech, speech-to-text, audio-to-face lipsync, and motion-capture clips for 3D agents.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

text_to_speech Text to speech

Synthesize spoken audio from text for a 3D avatar and return it as a base64 audio data URL (data:<mime>;base64,…) plus metadata. Free NVIDIA NIM Magpie TTS leads; OpenAI is the paid backstop. Because Magpie emits raw PCM, every non-pcm request is served as WAV — the returned `mime`, `format`, and `voice` describe the bytes you actually get, not the request. Pair the audio with audio_to_face to drive lipsync. Input text is capped at 4096 characters. Read-only — synthesizes audio without changing any platform state.

ParameterTypeDescription
text *stringThe text to speak (1–4096 characters).
formatstringRequested audio container (default "mp3"). The free NVIDIA lane serves every non-pcm request as WAV; the response metadata reports what you actually received.
languagestringBCP-47 language for the free NVIDIA lane (default "en-US"; also es-US, fr-FR, de-DE, zh-CN, vi-VN, it-IT, hi-IN, ja-JP).
modelstringOpenAI TTS model for the paid backstop lane (default "gpt-4o-mini-tts"). Ignored by the free NVIDIA lane, which always uses magpie-tts-multilingual.
speednumberPlayback speed multiplier, 0.5–2.0 (OpenAI backstop lane only; default 1.0).
voicestringVoice persona (default "nova"). The same id renders on either provider lane.

speech_to_text Speech to text

Transcribe spoken audio to text using the free NVIDIA NIM Riva recognizer. Pass the audio as base64 (raw or a data: URL). Accepted encodings: wav, pcm (set sampleRate), flac, ogg/opus — the WebM container from a browser MediaRecorder must be decoded to WAV or PCM first. Returns { text, confidence, language, model, durationSec } and, when `words` is set, per-word timestamps. Audio is capped at ~8 MB. Read-only — recognizes speech without changing any platform state.

ParameterTypeDescription
audio *stringThe audio to transcribe, base64-encoded (a raw base64 string or a data:<mime>;base64,… URL). Max ~8 MB decoded.
formatstringAudio encoding of the supplied bytes (default "wav"). Use "pcm" for raw 16-bit little-endian PCM (set sampleRate).
languagestringBCP-47 language hint for recognition (default "en-US").
modelstringOverride the Riva model name (advanced; defaults to the configured model).
sampleRateintegerSample rate in Hz for raw PCM input (default 16000). Ignored for WAV, which carries its own rate in the header.
wordsbooleanWhen true, also return per-word timestamps in a `words` array.

audio_to_face Audio to face (lipsync)

Generate a per-frame ARKit blendshape lipsync track from speech using free NVIDIA NIM Audio2Face-3D. Provide either `text` (the server synthesizes it with Magpie TTS, then animates that clip and returns both the audio and the animation) or `audio` (base64 wav/pcm you already have, so the lips match the exact bytes you will play). Returns { animation: { fps, blendShapeNames, frames, durationSec } } where each frame is { t, w } — t in seconds, w = weights ordered by blendShapeNames (ARKit-52). On the text path it also returns { audio: { base64, contentType, format } }. Read-only — produces a…

ParameterTypeDescription
audiostringPre-synthesized audio to animate, base64-encoded (raw or a data: URL). Provide this OR `text`. Set `format` to match the bytes.
formatstringEncoding of `audio` (default "wav"). Use "pcm" for raw 16-bit little-endian PCM and set `sampleRate`.
languagestringBCP-47 language for the text path (default "en-US"). Ignored when `audio` is supplied.
sampleRateintegerSample rate in Hz for raw PCM `audio` (default 16000). Ignored for WAV.
textstringText to synthesize and animate (1–4096 chars). Provide this OR `audio`. On this path the synthesized audio is returned alongside the animation.
voicestringVoice for the text path (default "nova"). Ignored when `audio` is supplied.

motion_capture_clips List motion-capture clips

List motion-capture clips from the three.ws library — recorded face/pose/hand/VMC tracks an avatar can play back. Returns clip metadata (id, slug, name, kind, format, duration_ms, frame_count, tags, visibility, play_count, price) but NOT the frames; fetch a clip by id with motion_capture_clip to get the animation track. Anonymous callers see only public clips; set THREE_WS_API_KEY to include your own. Cursor-paginated via next_cursor. Read-only live data.

ParameterTypeDescription
cursorstringPagination cursor from a previous response's next_cursor.
include_publicbooleanWhen authenticated (THREE_WS_API_KEY set), return your clips AND public ones instead of just your own. Ignored anonymously (always public-only).
kindstringFilter by capture kind: "face" (blendshapes), "pose" (body), "hand", or "vmc".
limitintegerHow many clips to return (1–100, default 50).

motion_capture_clip Get a motion-capture clip

Fetch a single motion-capture clip by id, including its full per-frame animation track. Returns { clip } with metadata plus `frames`: each frame is { t, shapes, mat? } — t in seconds, shapes a name→weight map (ARKit blendshapes for face clips; joint channels for pose/hand/vmc), and an optional 16-float transform matrix. Use this to drive an avatar from a clip discovered via motion_capture_clips. Public and unlisted clips are readable anonymously; a private clip needs THREE_WS_API_KEY for its owner. Read-only.

ParameterTypeDescription
id *stringThe clip id (UUID) returned by motion_capture_clips.