| 174 | } |
| 175 | |
| 176 | JsonValue clip_audio_path_field( |
| 177 | const JsonValue & value, |
| 178 | const std::filesystem::path & repo_root, |
| 179 | const std::filesystem::path & temp_dir, |
| 180 | double seconds) { |
| 181 | const auto absolute = std::filesystem::path(value.as_string()).is_absolute() |
| 182 | ? std::filesystem::path(value.as_string()) |
| 183 | : repo_root / value.as_string(); |
| 184 | return JsonValue::make_string(write_clipped_wav(absolute, temp_dir, seconds).string()); |
| 185 | } |
| 186 | |
| 187 | JsonValue derive_warmup_request( |
| 188 | const JsonValue & request, |
no test coverage detected