Skip to content
How the AI works

Honest and specific about what powers this.

A patient partner who speaks naturally in the language you are learning, understands your replies with an accent or mistakes, and corrects you gently as you go, is not a feature bolted onto Dialect. It is the product. Here is exactly how it works, and where every API call goes.

Three things the AI does

From your voice to a practice report.

Every session moves through three distinct AI steps. Each has a specific job, a specific route, and a check that keeps it inside its boundaries.

01

Understand your speech

The browser turns your words into text in the target language. That text becomes your turn in the conversation.

02

Converse at your level

A language model generates the partner's reply in the target language, with an English translation and a gentle correction if needed.

03

Coach afterward

The full transcript becomes a structured practice report, validated before it reaches you.

Step 01

Understand your speech.

When you speak, the browser's built-in Web Speech API captures your audio and converts it to text in the language you are learning. The recognizer is configured for the target language, so it handles your accent and your level of fluency. The audio stays on your device. What leaves the browser is text only: the words you said, in the order you said them.

That text is sent to /api/converse on Dialect's servers. There, it joins the running conversation history: the language, the level directive, and every previous turn in the session. The full context goes to the language model, which generates the partner's next response in the target language, along with an English translation and a correction if one is warranted.

What happens at /api/converse

1

Receives the learner's turn as text in the target language (no audio)

2

Appends it to the conversation history

3

Calls the language model with the full context, language, and level

4

Returns the partner's reply, an English translation, and any correction

Per-turn response shape

{
  reply:      string,       // in the target language
  reply_en:   string,       // English translation
  correction: null | {
    original: string,       // what the learner said
    better:   string,       // the improved form
    note:     string,       // brief explanation
  },
}

Step 02

Respond in a real voice in the target language.

The partner's response text from the language model goes to /api/tts. Dialect passes it to ElevenLabs, which synthesizes a natural, human-sounding voice in the target language. The audio streams back to the browser and plays immediately.

The voice is consistent across the whole session: the same partner, the same tone. It does not sound robotic. The goal is that the conversation feels like a real exchange in the language you are learning, not like a machine reading words aloud.

The language side is model-agnostic: it sits behind a thin abstraction layer that is not tied to any single provider or model version. When a better model becomes available, we can switch without you noticing a change in the product. The product keeps improving as the underlying models do.

The voice pipeline

Partner reply text/api/ttsElevenLabsAudio streamYou hear it

Step 03

Coach afterward.

When the session ends, the full transcript goes to /api/coach. The language model reads the whole conversation and produces a structured practice report: a confidence score, a headline, what went well, any corrections worth calling out again, the two or three things to practice next with examples, and a phrase from the session to remember.

Before the report reaches you, it passes through zod validation. The schema requires all sections to be present and correctly structured. If the model output does not match, it is discarded and the request is retried. You only ever see a complete, valid report.

The practice points are grounded in the transcript. The model is specifically prompted to produce observations tied to what you actually said in the session, not generic language tips.

Practice report schema (simplified)

{
  score:            number,       // 0-100, confidence
  headline:         string,       // one-line summary
  level_note:       string,       // note on level fit
  went_well:        string[],     // moments that worked
  corrections: [{
    you_said:       string,
    better:         string,
    why:            string,
  }],
  practice_points: [{
    point:          string,       // what to work on
    example:        string,       // how to try it
  }],
  phrase_to_remember: {
    target:         string,       // in target language
    translation:    string,
  },
}
Built AI-native

Without modern language and voice models, none of this exists.

A patient partner who speaks naturally in the language you are learning, understands your replies even with an accent, and corrects you gently as you go, is not a feature bolted onto Dialect. It is the product. The language side is model-agnostic behind a thin layer, so Dialect keeps getting better as the models do, without any change to the experience you see.

All API calls are server-side

Every call to the language model and to ElevenLabs goes through /api/converse, /api/tts, or /api/coach. API keys are environment variables on the server, never in the browser.

Model-agnostic language layer

A thin abstraction that can route to any capable language model. We switch when better models become available. You do not notice.

Validated outputs only

Every practice report is checked against a zod schema before it reaches you. Malformed or incomplete responses are discarded and retried.

Language practice, not instruction or advice.

Dialect is a language practice partner, not a certified course, exam, or accredited instruction, and not a substitute for a teacher when you need one. The AI partner plays the role of a patient, encouraging native speaker for practice purposes. Your voice is processed only to run the session and is not used to train AI models. You can export or delete your data at any time.

Read our care and safety approach
Questions

Common questions about the AI.

Try it. See what Dialect makes of your session.

One short spoken conversation free every day. No card required.