Let's translate subtitle files(srt) and add annotations using the Gemini API. - How to make learning a foreign language easier

The Gemini API Tool feature has been newly added to the Shadowing Player settings page.
With this feature, you can use AI to annotate subtitles, add explanations, translate them, or create customized outputs from subtitles as you wish.
This feature is available free of charge.

To use this feature, you must first obtain a Gemini API Key.
The Gemini API Key can be easily issued for free. You can find instructions simply by searching on Google.

https://www.youtube.com/watch?v=RVGbLSVFtIk

 

  1. For best results, run Adjust Subtitle in Settings first.

  2. Enter the issued key and save it. The saved key is encrypted and stored within the app, so once saved, it can be used continuously without re-entering.

  3. Select one of the following options from the menu below:
    · Annotation: Adds explanations for difficult words, idioms, or phrases in the subtitles.
    · Translation: Translates subtitles into the target language. While translation using Google Translate is also possible within the app, translation using this AI is far more accurate and natural.
    · New Prompt: Allows you to process or edit subtitles with your own custom prompt beyond annotation and translation. Write and save your prompt describing how you want the subtitles to be modified.  
    Ex) Provide a grammatical explanation of the original text in the target language and suggest alternative expressions with the same meaning.  Ex) Provide annotations in French and add a Japanese translation.

  4. Choose one of the following three output methods:
    · Create a separate subtitle file: Saves it in the location you specify. It can later be loaded as S2 subtitles.
    · Merge with (S1) main subtitles: The original line is kept, and the revised subtitle or notes are added beneath it. Since this changes the main subtitles, please back them up in advance if needed.
    · Insert as (S3) translated subtitles: Automatically loads as S3 subtitles, which can be displayed on screen by pressing the S3 button.

  5. Set the target language and start.

Left image: When set to "Translation – (S1) Merge into main subtitles – Japanese," the Japanese translation is automatically inserted below the subtitles.

Right image: When set to "Annotation – (S3) Make it into translated subtitles – Chinese," Chinese annotations of the original text are automatically generated and displayed on the screen as shown.


· If the message "The model is overloaded. Please try again later" appears, it means the server is unstable, so please run it again later.

· If the message "You exceeded your current quota, please check your plan and billing details." appears, it means you have reached your daily usage limit, so please try again later or consider upgrading to a paid plan.


· With the Gemini 2.5 Flash model, as of September 18, 2025, you can make up to 200 requests per day for free. This is roughly enough to translate subtitles for about a dozen movies, so the free tier should be sufficient. However, the definition of “free” may change at any time according to Gemini API policies.

· While processing is in progress, you must remain on the settings page. If you leave the settings page, the task will stop.


Shadowing Player is available for download on both the Play Store and the App Store.


---------------------------------------------------

Reference: Annotation Prompt

Regardless of the original language, always provide annotations in the language specified by the target language code.
Carefully examine the sentence’s expressions and words, and extract the items to be annotated strictly according to the rules below.

  1. Items to extract (output everything; do not omit one because of another): rules applied per index
    (a) Upper-intermediate words (CEFR B2+; e.g., consequently, reluctant, sophisticated, substantial)
    (b) Idioms/set phrases/fixed collocations/phrasal verbs/multi-word verbs/compound nouns/technical terms (e.g., in jest, hit it off, mum's the word, touch a sore spot, look down on)

    • If the sentence contains no B2+ words, omit (a). Do not force in lower-level words.

    • (a) and (b) are extracted independently. For example, extracting jest in (a) does not allow omitting in jest in (b).
      That is, a B2+ word inside an idiom and the idiom itself must both be annotated separately.
      Do not omit (b) even if its component words already appeared in (a).

  2. Handling duplicate meanings/expressions (important): rules applied per batch (takes precedence over Rule 1)

    • Within the same batch, never annotate an item again once it has been annotated.

    • For duplicate checks, default to the lemma headword, then lowercase + trim leading/trailing spaces + remove terminal punctuation (.,!?:;’" etc.), and compare for equality.

    • If a polysemous item is used with a clearly different meaning, output it anew.

  3. Output format (strict):

  • In JSON, items[].result is an array of strings, and each element must be exactly “Extracted item: meaning.” (Always end with a period.)

  • On the left side of every entry, use the dictionary lemma (headword); for idiomatic combinations, write the combination form.
    Example: got ripped off → get ripped off as the lemma.

  • Do not rewrite the original sentence. No explanations/examples/grammar notes.

  • Do not merge multiple items into one; list each as a separate item.

Examples (original language: en, language code: ja):
Input: “Keep your hands hygienic and avoid touching your face.”
Output:
hygienic: 衛生的な.
avoid ~ing: 〜することを避ける.

Examples (original language: en, language code: my):
Input: “He was born with undescended testicles.”
Output:
undescended testicle: မကျဆင်းသေးသော ကြောထုပ်.
undescended: မကျဆင်းသေးသော, မကျဆင်းထားသော.
testicle: ကြောထုပ်.

Examples (original language: zh, language code: ar):
Input: “保持手部卫生,避免触摸面部。”
Output (example):
手部卫生: نظافة اليدين.
避免: تجنب.
触摸: لمس.
面部: الوجه.


---------------------------------------------------

Reference: Translation Prompt

Translate each ITEM (index) into the target language code.

Return exactly one translation per ITEM.

Output only the translation.


댓글

이 블로그의 인기 게시물

Shadowing Player - How to learn a language with your favorite movies or dramas

(IOS) Shadowing Player - How to learn a language with your favorite movies or dramas

Language Code