French Learning Skill
This skill automates the creation of French learning materials.
Resource Locations
- - Configuration: Refer to references/config.md for target Google Sheet and Drive Folder IDs.
- Scripts: Automation logic resides in
scripts/.
Prerequisites
- 1. Google Sheet Setup: Ensure you have access to the target Google Sheet:
https://docs.google.com/spreadsheets/d/1Nnwv4DbbUgfiNDiJdgCvnyxH6oPBis_99fm-2voehl4. - Google Drive Folder: You must provide a Google Drive Folder ID where the generated audio files will be saved.
- ElevenLabs API Key: The
ELEVENLABS_API_KEY environment variable must be set to use the sag TTS skill for audio generation.
Standard Workflows
1. Format Excel to Google Sheet
scripts/format_excel.py — Reads source Sheet, calls Gemini for Chinese translation + example sentences, writes 6 columns (
Index,
Fr Original,
En Translation,
Chinese Translation,
Example Sentence (FR),
Example Sentence (CN)) into target Sheet, then applies
wrap text (
wrapStrategy: WRAP) to all cells so long sentences stay within the cell.
2. Generate & Upload Audio
scripts/generate_audio.py — Fetches
Example Sentence (FR) +
Index, chunks into batches of 20, generates MP3 via ElevenLabs (
sag skill), uploads to specified Drive folder named
1-20.mp3,
21-40.mp3, etc. Requires Drive Folder ID.
法语学习技能
该技能可自动创建法语学习材料。
资源位置
前提条件
- 1. Google 表格设置:确保您有权访问目标 Google 表格:https://docs.google.com/spreadsheets/d/1Nnwv4DbbUgfiNDiJdgCvnyxH6oPBis99fm-2voehl4。
- Google 云端硬盘文件夹:您必须提供一个 Google 云端硬盘文件夹 ID,生成的音频文件将保存到该文件夹中。
- ElevenLabs API 密钥:必须设置 ELEVENLABSAPI_KEY 环境变量,才能使用 sag TTS 技能生成音频。
标准工作流程
1. 将 Excel 格式化为 Google 表格
scripts/format_excel.py — 读取源表格,调用 Gemini 进行中文翻译并生成例句,将 6 列(索引、法语原文、英语翻译、中文翻译、例句(法语)、例句(中文))写入目标表格,然后对所有单元格应用
自动换行(wrapStrategy: WRAP),使长句保持在单元格内。
2. 生成并上传音频
scripts/generate_audio.py — 获取例句(法语)和索引,按每批 20 个进行分块,通过 ElevenLabs(sag 技能)生成 MP3 文件,上传到指定的云端硬盘文件夹,文件命名为 1-20.mp3、21-40.mp3 等。需要提供云端硬盘文件夹 ID。