Add C++ support for UVR models (#2269)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user