| 124 | request.model_path = config.model_dir; |
| 125 | if (!config.language.empty()) { |
| 126 | request.options.emplace("language", config.language); |
| 127 | } |
| 128 | auto manifest = load_request_assets(request); |
| 129 | auto voice_asset_root = manifest->voice_asset_root; |
| 130 | return PocketTTSModel(std::move(voice_asset_root), std::move(manifest)); |
| 131 | } |
| 132 | |
| 133 | std::unique_ptr<runtime::IVoiceTaskSession> PocketTTSModel::create_task_session( |
| 134 | const runtime::TaskSpec & task, |
| 135 | const runtime::SessionOptions & options) const { |
| 136 | if (!manifest_) { |
| 137 | throw std::runtime_error("PocketTTS model is not loaded"); |
| 138 | } |
| 139 | return std::make_unique<PocketTTSSession>(task, options, manifest_, model_dir_); |
nothing calls this directly
no test coverage detected