Add C++ support for UVR models (#2269)

This commit is contained in:
Fangjun Kuang
2025-06-01 17:22:08 +08:00
committed by GitHub
parent e0ca224b76
commit 2b2788332e
35 changed files with 967 additions and 101 deletions

View File

@@ -4,22 +4,27 @@
#ifndef SHERPA_ONNX_CSRC_MICROPHONE_H_
#define SHERPA_ONNX_CSRC_MICROPHONE_H_
#include "portaudio.h" // NOLINT
#include <cstdint>
#include "portaudio.h" // NOLINT
namespace sherpa_onnx {
class Microphone {
PaStream *stream = nullptr;
public:
Microphone();
~Microphone();
int GetDeviceCount() const;
int GetDefaultInputDevice() const;
void PrintDevices(int sel) const;
bool OpenDevice(int index, int sample_rate, int channel, PaStreamCallback cb, void* userdata);
int32_t GetDeviceCount() const;
int32_t GetDefaultInputDevice() const;
void PrintDevices(int32_t sel) const;
bool OpenDevice(int32_t index, int32_t sample_rate, int32_t channel,
PaStreamCallback cb, void *userdata);
void CloseDevice();
private:
PaStream *stream = nullptr;
};
} // namespace sherpa_onnx