| 95 | } |
| 96 | |
| 97 | std::shared_ptr<const SileroWeights> require_weights(std::shared_ptr<const SileroWeights> weights) { |
| 98 | if (!weights) { |
| 99 | throw std::runtime_error("Silero VAD runtime requires weights"); |
| 100 | } |
| 101 | return weights; |
| 102 | } |
| 103 | |
| 104 | std::vector<float> require_mono_audio(const runtime::AudioBuffer & audio, const char * context) { |
| 105 | if (audio.sample_rate <= 0) { |