Support extra languages in multi-lang kokoro tts (#2303)
This commit is contained in:
@@ -27,6 +27,13 @@ struct OfflineTtsKokoroModelConfig {
|
||||
// speed = 1 / length_scale
|
||||
float length_scale = 1.0;
|
||||
|
||||
// Used only for Kokoro >= 1.0.
|
||||
//
|
||||
// If it is not empty, meta_data.voice is ignored.
|
||||
// Example values: es (Spanish), fr (French), pt (Portuguese)
|
||||
// See https://hf-mirror.com/hexgrad/Kokoro-82M/blob/main/VOICES.md
|
||||
std::string lang;
|
||||
|
||||
OfflineTtsKokoroModelConfig() = default;
|
||||
|
||||
OfflineTtsKokoroModelConfig(const std::string &model,
|
||||
@@ -34,14 +41,16 @@ struct OfflineTtsKokoroModelConfig {
|
||||
const std::string &tokens,
|
||||
const std::string &lexicon,
|
||||
const std::string &data_dir,
|
||||
const std::string &dict_dir, float length_scale)
|
||||
const std::string &dict_dir, float length_scale,
|
||||
const std::string &lang)
|
||||
: model(model),
|
||||
voices(voices),
|
||||
tokens(tokens),
|
||||
lexicon(lexicon),
|
||||
data_dir(data_dir),
|
||||
dict_dir(dict_dir),
|
||||
length_scale(length_scale) {}
|
||||
length_scale(length_scale),
|
||||
lang(lang) {}
|
||||
|
||||
void Register(ParseOptions *po);
|
||||
bool Validate() const;
|
||||
|
||||
Reference in New Issue
Block a user