Uahh/ToastFish · warning
检测到您未安装日语语音包,请去“设置”->“时间和语言”->“语音”->“添加语音”中安装日本语,以免影响正常使用。
Error message
检测到您未安装日语语音包,请去“设置”->“时间和语言”->“语音”->“添加语音”中安装日本语,以免影响正常使用。
What it means
In SelectBook_Click (View/ToastFish.xaml.cs:557), when the user selects a Japanese word book, the app iterates installed SpeechSynthesizer voices and checks for a voice whose Culture.IetfLanguageTag equals "ja-JP". If none is found (Flag stays false), it shows this WinForms MessageBox telling the user to install the Japanese voice via Windows Settings > Time & Language > Speech. This is not an exception but a hard dependency warning: ToastFish's Japanese push/pronunciation features rely on the OS TTS engine, which cannot speak ja-JP without the voice pack.
Solutions
- Install the Japanese voice pack: Windows Settings > Time & Language > Speech > Add voices > 日本語 (ja-JP), then restart ToastFish.
- Alternative path: Settings > Time & Language > Language > Add a language > 日本語 (include the Speech optional feature), then reboot.
- Verify programmatically with PowerShell: Add-Type -AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).GetInstalledVoices() and confirm a ja-JP voice appears.
- If the app was running during installation, close and relaunch ToastFish so SpeechSynthesizer enumerates the newly installed voice.
- If only silent push is needed and audio is unwanted, use a book without TTS dependency or ignore the dialog (the book selection still proceeds since Select.TABLE_NAME is set afterwards).
Example fix
// before
if(Flag == false)
System.Windows.Forms.MessageBox.Show("检测到您未安装日语语音包...");
// after
if (Flag == false)
{
var result = System.Windows.Forms.MessageBox.Show(
"检测到您未安装日语语音包,是否打开系统设置安装?", "提示",
MessageBoxButtons.YesNo, MessageBoxIcon.Information);
if (result == DialogResult.Yes)
Process.Start("ms-settings:menuspeech"); // or speech settings deep link
} Defensive patterns
Strategy: validation
Validate before calling
using (var synth = new System.Speech.Synthesis.SpeechSynthesizer())
{
bool jaInstalled = synth.GetInstalledVoices()
.Any(v => v.VoiceInfo.Culture.IetfLanguageTag == "ja-JP");
if (!jaInstalled)
{
// prompt user to install the ja-JP voice pack before selecting a Japanese book
System.Windows.Forms.MessageBox.Show("检测到您未安装日语语音包,请先在 设置>时间和语言>语音 中安装日本语。");
}
} Prevention
- Install the ja-JP speech feature before first use of Japanese word books.
- Check GetInstalledVoices() at app startup and warn once, instead of on every book click.
- On Windows N editions, install the Media Feature Pack which some speech components depend on.
- After installing a voice pack, restart the app so voices are re-enumerated.
When it happens
Trigger: User clicks a Japanese book entry (SelectBook_Click with a Japanese table name such as a Japanese word list) while the Windows speech synthesis API (System.Speech.Synthesis.SpeechSynthesizer.GetInstalledVoices) returns no voice with IetfLanguageTag == "ja-JP".
Common situations: Fresh Windows 10/11 installs (only the OS language's voice pack is installed by default); Windows N/KN editions missing media features; Chinese-language systems where ja-JP was never added in Settings; enterprise images that strip optional language features; running the app right after selecting a Japanese book without ever configuring speech.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- 程序已经在运行了,不能运行两次。\n如果右下角软件已经退出,请在任务管理器中结束ToastFish任务。
- ex.Message
- ex.Message, "Excel read error"
- 导入失败,Excel格式不正确或Excel文件损坏
- 卡题出错!
AI-assisted analysis of Uahh/ToastFish@2508784a66 (2026-09-15).
Data as JSON: /api/errors/8bb0d1a14167fb3c.
Report an issue: GitHub.
Appendix: source
Thrown at View/ToastFish.xaml.cs:557
else if (sender.ToString() == "专八真题高频词")
TempName = "Level8_1";
else if (sender.ToString() == "专八核心词汇")
TempName = "Level8luan_2";
else if (sender.ToString() == "顺序五十音")
TempName = "Goin";
else if (sender.ToString() == "标准日本语中级词汇")
{
TempName = "StdJp_Mid";
bool Flag = false;
SpeechSynthesizer synth = new SpeechSynthesizer();
foreach (InstalledVoice voice in synth.GetInstalledVoices())
{
VoiceInfo info = voice.VoiceInfo;
if (info.Culture.IetfLanguageTag == "ja-JP")
Flag = true;
}
if(Flag == false)
System.Windows.Forms.MessageBox.Show("检测到您未安装日语语音包,请去“设置”->“时间和语言”->“语音”->“添加语音”中安装日本语,以免影响正常使用。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else if (sender.ToString() == "随机五十音测试")
TempName = "Goin";
Select.TABLE_NAME = TempName;
Se.UpdateBookName(TempName);
Se.UpdateTableCount();
//if (sender.ToString() == "顺序五十音")
//{
// int Progress = Se.GetGoinProgress();
// PushWords.PushMessage("当前词库:" + sender.ToString() + "\n当前进度:" + Progress.ToString() + "/104");
// }
// else
//{
List<int> res = Se.SelectCount();
pushWords.PushMessage("当前词库:" + sender.ToString() + "\n当前进度:" + res[0].ToString() + "/" + res[1].ToString());
// }
}
View on GitHub (pinned to 2508784a66)