| 464 | } |
| 465 | |
| 466 | static json speaker_from_file(const std::string & speaker_file) { |
| 467 | std::ifstream file(speaker_file); |
| 468 | if (!file) { |
| 469 | LOG_ERR("%s: Failed to open file '%s' for reading\n", __func__, speaker_file.c_str()); |
| 470 | return json(); |
| 471 | } |
| 472 | |
| 473 | json speaker = json::parse(file); |
| 474 | return speaker; |
| 475 | } |
| 476 | |
| 477 | static outetts_version get_tts_version(llama_model *model, json speaker = json::object()) { |
| 478 | if (speaker.contains("version")) { |