Skip to content

AI 0.8.0: A voice picker for text-to-speech endpoints

AI 0.8.0 makes choosing a voice for a text-to-speech endpoint easier. When the provider publishes a list of voices, as Mistral does, the Default Voice field becomes two dropdowns: a speaker, then a mood.

Speaker and mood

On a text-to-speech endpoint, after the model list loads, the form also fetches the provider’s voices with the same API key. Pick a Speaker, then a Mood; the endpoint stores the voice id that pair stands for, such as en_paul_neutral. Until a mood is picked, the form warns that this provider cannot generate speech without a voice. Mistral refuses to generate speech without one.

Providers without a voice list, such as OpenRouter, keep the text field from 0.6.0, where you type a voice id.

The voice reaches the provider

When speak/3 uses the endpoint’s default voice, it now sends it in the field each provider expects: voice_id for Mistral, voice for the others. A voice passed by the caller is still used as given.

Upgrading

No migration. Update the dependency. Existing endpoints keep the voice they have stored, and the picker preselects it.

Full release notes: AI 0.8.0

0.8.0 · 10 June 2026

Added

  • Voice picker for TTS endpoints. When a TTS endpoint’s provider exposes a voice catalogue, the endpoint form’s “Default Voice” field becomes a two-level speaker → mood picker (Mistral Studio style) instead of a free-text box — pick a speaker (grouped/labelled by language), then its mood; the resolved voice slug is what’s stored:
    • PhoenixKitAI.OpenRouterClient.fetch_voices/2 — fetches GET /audio/voices (Mistral-specific; ~30 presets in a single limit=100 page) and returns a normalized [%{slug, name, language, gender, tags}]. The slug (e.g. en_paul_neutral) is what /audio/speech accepts as voice, so it stores/sends straight through speak/3.
    • The picker fetches inline after the model fetch (reusing the validated key + base_url), only for the TTS type. Providers without a voices endpoint (e.g. OpenRouter) return non-200 and the form falls back to the free-text field — kept provider-neutral.
    • Required-voice hint: when the voice picker is shown (Mistral) and no voice is selected, the form warns that a voice is required — Mistral’s /audio/speech returns 400 without a voice/ref_audio.
    • The endpoint’s stored default voice is sent on the provider’s documented field: voice_id for Mistral (matches its OpenAPI schema; the voices catalogue is Mistral-specific so a stored voice is always a Mistral slug), voice for everything else (OpenRouter / OSS vLLM presets). An explicit caller-supplied :voice/:voice_id is never overridden.

AI 0.8.0. Install or update: {:phoenix_kit_ai, "~> 0.8"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.