REST endpoints for audio streaming and text-to-speech
com.augmentos.shazam
package only./api/audio/:userId
at line 47, but it should be just /audio/:userId
since the router is mounted at /api
.Parameter | Type | Description |
---|---|---|
userId | string | Target user ID (in URL) |
Parameter | Type | Required | Description |
---|---|---|---|
apiKey | string | Yes | App API key |
packageName | string | Yes | Must be com.augmentos.shazam |
userId | string | Yes | Target user ID (same as URL parameter) |
application/octet-stream
packages/cloud/src/routes/audio.routes.ts:47-91
shazamAuthMiddleware
- Validates package and API keyAudioManager.getRecentAudioBuffer()
com.augmentos.shazam
package is alloweduserSession.audioManager.getRecentAudioBuffer()
/api/tts
at line 94, but it should be just /tts
since the router is mounted at /api
.Parameter | Type | Required | Description |
---|---|---|---|
text | string | Yes | Text to convert to speech |
voice_id | string | No | ElevenLabs voice ID (uses default if not provided) |
model_id | string | No | TTS model (defaults to eleven_flash_v2_5 ) |
voice_settings | JSON string | No | Voice customization settings |
audio/mpeg
keep-alive
packages/cloud/src/routes/audio.routes.ts:94-223
ELEVENLABS_API_KEY
: Your ElevenLabs API keyELEVENLABS_DEFAULT_VOICE_ID
: Default voice to use (optional if voice_id provided)https://api.elevenlabs.io/v1/text-to-speech/{voice_id}/stream
xi-api-key
header for authenticationCode | Description |
---|---|
400 | Invalid parameters or voice settings |
401 | Authentication required or invalid API key |
403 | Unauthorized package name (audio endpoint only) |
404 | Session not found or no audio available |
500 | Internal server error or TTS service not configured |
/api
prefix when they shouldn’t