| 110 | if (compression_ratio <= 0) { |
| 111 | throw std::runtime_error("VibeVoice speech compression ratio must be positive"); |
| 112 | } |
| 113 | return static_cast<int64_t>((samples + static_cast<size_t>(compression_ratio) - 1) / |
| 114 | static_cast<size_t>(compression_ratio)); |
| 115 | } |
| 116 | |
| 117 | std::vector<float> convert_prompt_audio_to_mono_resampled( |
| 118 | const runtime::AudioBuffer & audio, |