| 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_); |
| 140 | } |
| 141 | |
| 142 | const std::filesystem::path & PocketTTSModel::model_dir() const noexcept { |
| 143 | return model_dir_; |
| 144 | } |
| 145 | |
| 146 | PocketTTSLoadedModel::PocketTTSLoadedModel( |
| 147 | runtime::ModelMetadata metadata, |
| 148 | runtime::CapabilitySet capabilities, |
| 149 | PocketTTSModel model) |
| 150 | : metadata_(std::move(metadata)), |
| 151 | capabilities_(std::move(capabilities)), |
| 152 | model_(std::move(model)) {} |
| 153 | |
| 154 | const runtime::ModelMetadata & PocketTTSLoadedModel::metadata() const noexcept { |
| 155 | return metadata_; |
| 156 | } |
| 157 | |
| 158 | const runtime::CapabilitySet & PocketTTSLoadedModel::capabilities() const noexcept { |
| 159 | return capabilities_; |
| 160 | } |
| 161 | |
| 162 | std::unique_ptr<runtime::IVoiceTaskSession> PocketTTSLoadedModel::create_task_session( |
| 163 | const runtime::TaskSpec & task, |
| 164 | const runtime::SessionOptions & options) const { |
| 165 | return model_.create_task_session(task, options); |
| 166 | } |
nothing calls this directly
no test coverage detected