Yujing (语境): Dynamic AI Sentences and Native Audio

AnkiWeb addon 588397935

Generates dynamic AI example sentences and OpenAI TTS audio for Anki cards during review, with background processing and configurable settings.
AI-generated summary; may contain mistakes.

card-creationaiformatting

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
0 (👍 0 · 👎 0)
Updated
2026-04-08
Anki versions
2.1.1~
Description language
en

Maintenance

active

  • Last update or commit was 176 days before the snapshot (2026-04-08).

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.1+2026-04-08
History across monthly snapshots

Loading…

Similar addons

AI Language Explainer

Generates contextual written explanations and spoken audio for target words in Anki sentence cards using OpenAI models and selectable TTS engines.

card-creationaisync-integration

Rating 10 👍 10 · 👎 0 ⭐ 9 Anki 2.1.66~ Updated 2025-10-07
Anki AI Dynamic Cards Add-on (AI generated examples)

Generates fresh, unstored AI example sentences for simple English word or phrase cards, supports multiple providers, and lets users request new examples.

ai

Rating 5 👍 3 · 👎 2 ⭐ 4 Anki 2.1.66~ Updated 2025-12-24

README

Yujing (语境)

AI-Powered Example Sentence and Audio Generator for Anki

Yujing (语境) is an Anki add-on designed to provide dynamic context for language learners. It utilizes the OpenAI API to generate new example sentences and corresponding audio for specific cards during the review process. This prevents the "stagnation" of seeing the same example sentence repeatedly, ensuring that each time a word is reviewed, it is presented in a fresh context.


Core Features

  • Background Generation: Sentence and audio generation occurs in a background thread. This allows the user to continue their review session without waiting for the API response.
  • i+1 Principle: The default prompt instructs the AI to generate sentences using simple vocabulary, ensuring that the target word is the only unfamiliar element in the sentence.
  • Text-to-Speech (TTS): The add-on uses OpenAI’s audio/speech endpoint to generate high-quality MP3 files, which are saved to the Anki media folder and linked to the card.
  • Automatic Highlighting: The add-on identifies the target word within the new sentence and applies <b> tags automatically for visual clarity.
  • Configurable Settings: Users can modify the API endpoint, model (e.g., GPT-4o-mini), prompt template, and TTS voice (e.g., Alloy, Nova) via the settings menu.

Technical Requirements

Required Fields

For this add-on to function, the Note Type being used must include the following three fields:

  1. Generated Sentence
  2. Generated Translation
  3. Generated Audio

API Access

An OpenAI API Key with a positive account balance is required. Users are responsible for their own API usage costs.


Card Template Integration

To display the generated content on your cards with a fallback to your original deck's content, add the following logic to your Back Template:

{{#Generated Sentence}}
  <div class="ai-sentence">{{Generated Sentence}}</div>
  <div class="ai-translation">{{Generated Translation}}</div>
  <hr />
{{/Generated Sentence}}

{{^Generated Sentence}}
  <div class="original-sentence">{{Sentence}}</div>
  <div class="original-translation">{{Translation}}</div>
  <hr />
{{/Generated Sentence}}

<div class="media">
  {{#Generated Audio}}
    {{Generated Audio}}
  {{/Generated Audio}}
  {{^Generated Audio}}
    {{SentenceAudio}}
  {{/Generated Audio}}
</div>