Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- app.py +0 -5
- requirements.txt +2 -0
app.py
CHANGED
|
@@ -1832,8 +1832,6 @@ window.wgPickVoice = function(profile, reply) {
|
|
| 1832 |
});
|
| 1833 |
if (fallbackMatch) return fallbackMatch;
|
| 1834 |
}
|
| 1835 |
-
var gender = (reply && reply.dataset && reply.dataset.voiceGender) || profile.gender || 'neutral';
|
| 1836 |
-
if (gender !== 'neutral') return null;
|
| 1837 |
return voices.find(function(voice) { return /^en(-|_)/i.test(voice.lang || ''); }) || voices[0];
|
| 1838 |
};
|
| 1839 |
|
|
@@ -1885,9 +1883,6 @@ window.wgSpeak = function(btn) {
|
|
| 1885 |
utterance.rate = profile.rate;
|
| 1886 |
utterance.pitch = profile.pitch;
|
| 1887 |
utterance.voice = window.wgPickVoice(profile, reply);
|
| 1888 |
-
if (!utterance.voice && profile.gender !== 'neutral') {
|
| 1889 |
-
return;
|
| 1890 |
-
}
|
| 1891 |
utterance.onstart = function() {
|
| 1892 |
window._wgSpeakingBtn = btn;
|
| 1893 |
window._wgSpeakingReply = reply;
|
|
|
|
| 1832 |
});
|
| 1833 |
if (fallbackMatch) return fallbackMatch;
|
| 1834 |
}
|
|
|
|
|
|
|
| 1835 |
return voices.find(function(voice) { return /^en(-|_)/i.test(voice.lang || ''); }) || voices[0];
|
| 1836 |
};
|
| 1837 |
|
|
|
|
| 1883 |
utterance.rate = profile.rate;
|
| 1884 |
utterance.pitch = profile.pitch;
|
| 1885 |
utterance.voice = window.wgPickVoice(profile, reply);
|
|
|
|
|
|
|
|
|
|
| 1886 |
utterance.onstart = function() {
|
| 1887 |
window._wgSpeakingBtn = btn;
|
| 1888 |
window._wgSpeakingReply = reply;
|
requirements.txt
CHANGED
|
@@ -10,3 +10,5 @@ huggingface-hub>=0.22.0
|
|
| 10 |
datasets>=2.19.0
|
| 11 |
gradio==6.17.3
|
| 12 |
kokoro>=0.9.2
|
|
|
|
|
|
|
|
|
| 10 |
datasets>=2.19.0
|
| 11 |
gradio==6.17.3
|
| 12 |
kokoro>=0.9.2
|
| 13 |
+
spacy>=3.8.0,<3.9
|
| 14 |
+
https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl
|