WaniKani Context Sentence Google TTS

Add TTS buttons to context sentences on lesson pages.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
MichaelCharles
今日安裝
0
安裝總數
0
評價
0 0 0
版本
1.0.1
建立日期
2025-10-01
更新日期
2025-10-01
尺寸
3.7 KB
授權條款
Apache, https://www.apache.org/licenses/LICENSE-2.0
腳本執行於

Adds text-to-speech buttons to Japanese context sentences and word combinations on WaniKani lesson and review pages. Click the 🔊 button next to any Japanese sentence to hear it spoken aloud using Google's Neural2 Japanese voices at 80% speed for easier comprehension.

You must update the script with a valid API key from Google Cloud Console.

  1. Create a new project or select an existing one
  2. Enable the "Cloud Text-to-Speech API" for your project
  3. Go to "APIs & Services" > "Credentials"
  4. Click "Create Credentials" > "API Key"
  5. Copy the API key and replace the value for ttsApiKey in the userscript.

The playback speed is also configurable by changing the value of the speakingRate variable, where 1 is 100% speed. The default value is 0.8 setting it to 80% speed.

Additionally, you can use one of three voices and can configure this with the voice variable. The default value is "ja-JP-Neural2-C", but "ja-JP-Neural2-B" and "ja-JP-Neural2-D" are also valid voices.