Skip to main content

How is usage time calculated and billed?

Usage time starts when you call the stream() method and ends when that specific stream closes. The time is tracked in seconds and billed per minute.

What causes latency and how can I optimize it?

Latency can come from several sources:
  • Connection setup time (usually 4-5 seconds, but can be up to 10 seconds)
  • LLM processing time
  • TTS generation
  • Face generation
  • Network conditions
To optimize latency:
  • Consider using our turnkey solution instead of custom-LLM
  • Use the streaming API for custom LLM implementations

How do I handle multilingual conversations?

Anam supports multilingual conversations across over 50 languages. To configure:
  1. Set the transcription language: Add languageCode to your persona config when creating a session token (e.g., "languageCode": "fr" for French)
  2. Choose a matching voice: Select a voice in your target language from the Anam Lab
  3. Write your system prompt: Instruct the persona to respond in the target language
For detailed configuration and supported languages, see our Multilingual Support guide.

Can I interrupt the persona while it’s speaking?

Yes, you can interrupt the persona in two ways:
  1. When using streaming, user speech will automatically interrupt the current stream
  2. Use the interruptPersona() method to programmatically stop the persona mid-speech. See the interrupt command for more information.

How do I integrate my own LLM?

See our custom LLM guide for more information.

What are the browser compatibility requirements?

The SDK should work well with any recent Chromium-based or Firefox browser. It requires:
  • Modern browser with WebRTC support
  • Microphone permissions for audio input
  • Autoplay capabilities for video/audio
  • WebAssembly support
Safari/iOS notes:
  • Requires explicit user interaction for audio playback
  • May have additional security policy requirements
  • WebKit engine has specific autoplay restrictions

How do I monitor current usage?

Usage tracking options:
  • Available in Anam Lab
  • API endpoint for usage stats coming soon
  • Session logs available in the Anam Lab

How do I handle connection issues?

Common issues and solutions:
  • For “403 Forbidden” errors, verify API key/session token
  • If video doesn’t appear, check element IDs match exactly
  • Connection timeouts may require retry logic
  • Session tokens expire and need refresh
  • Monitor CONNECTION_CLOSED events for network issues