Add multilingual Piper voices with end-to-end coverage (#3)

* Add browser Piper Chinese voices and fix timeline scale

* Add multilingual Piper voices with end-to-end tests

---------

Co-authored-by: haixin.yang <haixin.yang@weimob.com>
This commit is contained in:
MartinDelophyandhaixin.yang authored and GitHub committed 2026-07-15 11:12:38 +08:00
1 parent 46ec49bd52
commit 681da02cb3
10 files changed
+186 -5

No files matched your search

+7 -1
View File
@@ -1023,6 +1023,8 @@ export function VoiceSynthesisPanel({
setFavoriteVoiceIds,
t,
}) {
const voiceLanguages = useMemo(() => [...new Set(VOICES.map((voice) => voice.language))], []);
return (
<>
<label className="field-label" htmlFor="script-input">
@@ -1048,13 +1050,17 @@ export function VoiceSynthesisPanel({
{showVoiceFilter ? (
<Popover onClose={() => setShowVoiceFilter(false)}>
<div className="menu-list">
{["all", "中文", "English", "piper", "kokoro"].map((filter) => (
{["all", ...voiceLanguages].map((filter) => (
<button
type="button"
className={voiceFilter === filter ? "is-selected" : ""}
key={filter}
onClick={() => {
setVoiceFilter(filter);
if (filter !== "all") {
const firstVoiceForLanguage = VOICES.find((voice) => voice.language === filter);
if (firstVoiceForLanguage) setSelectedVoiceId(firstVoiceForLanguage.id);
}
setShowVoiceFilter(false);
}}
>