#how to use websocket in elevenlabs with basic plan(5$) with accuracy

1 messages · Page 1 of 1 (latest)

jolly skiffBOT
#
AI-generated Answer for diin_44884

Short answer: Yes—you can use the ElevenLabs WebSocket API on the $5 Starter plan. API access (including WebSockets) is included in all plans; usage just consumes your monthly credits. Starter concurrency is limited (see below).

How to use Text-to-Speech over WebSocket

  • Endpoint: wss://api.elevenlabs.io/v1/text-to-speech/{voice_id}/stream-input. Pass your model as a query param (e.g., model_id=eleven_flash_v2_5). WebSockets are not available for the eleven_v3 model. (elevenlabs.io)
  • Auth: Send your API key in the xi-api-key header during the handshake, or include xi_api_key in the initial initializeConnection message. (elevenlabs.io)
  • Initialize: First message typically sets voice_settings and optional generation_config (e.g., chunk_length_schedule). Then send text messages; send an empty string "" to close. Use flush: true to force generation of buffered text. (elevenlabs.io)
  • Keep-alive: Socket auto-closes after 20s idle; either add inactivity_timeout (max 180s) in the URL or periodically send a single space " " to keep it open. (elevenlabs.io)
  • Alignment/timestamps: Set sync_alignment=true (query) to include timing with every chunk, or read alignment fields from responses when provided. (elevenlabs.io)
  • Latency/quality tips: Eleven recommends eleven_flash_v2_5 for low latency streaming; tune chunk_length_schedule to balance latency vs. quality. (elevenlabs.io)

Plan and limits (Starter $5)

  • API included in all plans; you only pay in credits for generation. (help.elevenlabs.io)
  • Starter plan is $5/month; includes API access. (elevenlabs.io)
  • Concurrency limits (parallel requests): Starter = 6 for Flash/Turbo models, 3 for other models (affects how many simultaneous WebSocket generations you can run). (help.elevenlabs.io)

Official quick-start guides

  • Step-by-step WebSocket TTS guide (Python/Node), including sample code, buffering, flush, and best practices. (elevenlabs.io)
  • API reference for the stream-input WebSocket, including parameters and message schema. (elevenlabs.io)

If you need an example URL shape:
wss://api.elevenlabs.io/v1/text-to-speech/{voice_id}/stream-input?model_id=eleven_flash_v2_5&inactivity_timeout=180
Use xi-api-key in the handshake header, send an initialize message with voice_settings and generation_config, then stream your text and close with "" as documented. (elevenlabs.io)

Model notes (for “accuracy” of output quality)

  • eleven_v3 is the newest, highest-quality model, but it does not support WebSockets; for streaming, use eleven_flash_v2_5 (ultra-low-latency) or other TTS models that support WebSockets. (elevenlabs.io
raw goblet
#

give me default voice for this

jolly skiffBOT
#
AI-generated Answer for diin_44884

There isn’t a single “default voice” you can omit in the API. The WebSocket (and REST) Text-to-Speech endpoints require a specific voice_id in the URL, and ElevenLabs provides a curated set of Default voices you can choose from. You must pick one of those voice IDs. (elevenlabs.io)

How to get a Default voice_id:

  • From the UI: open My Voices → Default tab → More actions → Copy voice ID. (help.elevenlabs.io)
  • From the API: call List voices and filter for voice_type=default (GET /v2/voices), then select a voice_id from the response. (elevenlabs.io)

Note: “Get default voice settings” (GET /v1/voices/settings/default) only returns default generation settings (stability, similarity, speed, etc.)—it does not return a default voice. (elevenlabs.io)

If you just need a placeholder for testing, the WebSocket guide uses an example voice_id (Xb7hH8MSUJpSbSDYk0k2), but it’s only an example—not a universal default. Pick any Default voice you prefer and use its ID. (elevenlabs.io)

Sources:
Generate audio in real-time | ElevenLabs Documentation
How do I access ElevenLabs Default voices? – ElevenLabs
List voices | ElevenLabs Documentation
Get default voice settings | ElevenLabs Documentation
Generate audio in real-time | ElevenLabs Documentation

raw goblet
#

in this websocket is itaccepts pcm 8000