mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-30 18:07:38 -05:00
use ISO 639-1 language code
This commit is contained in:
+1
-1
@@ -4229,7 +4229,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
|
||||
|
||||
add_opt(common_arg(
|
||||
{"--tts-lang"}, "FNAME",
|
||||
"language (two-letter country code) for audio generation\n"
|
||||
"language (ISO 639-1) for audio generation\n"
|
||||
"see tts/README.md for per-model usage notes",
|
||||
[](common_params & params, const std::string & value) {
|
||||
params.tts_lang = value;
|
||||
|
||||
@@ -19,15 +19,18 @@
|
||||
// Audio generation helpers
|
||||
//
|
||||
|
||||
// maps the 2-letter --tts-lang codes (see tools/tts/README.md) to the language
|
||||
// maps the --tts-lang codes (see tools/tts/README.md) to the language
|
||||
// names used by the codec_language special tokens
|
||||
//
|
||||
// primary keys are ISO 639-1 codes; the old non-standard codes ("cn", "ge",
|
||||
// "po", "sp") are kept as aliases for backward compatibility
|
||||
static const std::unordered_map<std::string, std::string> tts_lang_codes = {
|
||||
{ "cn", "chinese" },
|
||||
{ "zh", "chinese" },
|
||||
{ "en", "english" },
|
||||
{ "ge", "german" },
|
||||
{ "de", "german" },
|
||||
{ "it", "italian" },
|
||||
{ "po", "portuguese" },
|
||||
{ "sp", "spanish" },
|
||||
{ "pt", "portuguese" },
|
||||
{ "es", "spanish" },
|
||||
{ "ja", "japanese" },
|
||||
{ "ko", "korean" },
|
||||
{ "fr", "french" },
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ Common params:
|
||||
## Qwen3-TTS
|
||||
|
||||
Available params:
|
||||
- `--tts-lang` can be `cn`, `en`, `ge`, `it`, `po`, `sp`, `ja`, `ko`, `fr`, `ru` (default: `en`)
|
||||
- `--tts-lang` can be `zh`, `en`, `de`, `it`, `pt`, `es`, `ja`, `ko`, `fr`, `ru` (default: `en`)
|
||||
- `--tts-speaker-file` should point to a speaker reference audio file (wav, mp3)
|
||||
|
||||
Example usage:
|
||||
|
||||
Reference in New Issue
Block a user