Add C++ microphone examples for audio tagging (#749)
This commit is contained in:
@@ -68,8 +68,8 @@ static void Record(const char *device_name, int32_t expected_sample_rate) {
|
||||
|
||||
int32_t chunk = 0.1 * alsa.GetActualSampleRate();
|
||||
while (!stop) {
|
||||
std::lock_guard<std::mutex> lock(samples_mutex);
|
||||
const std::vector<float> &s = alsa.Read(chunk);
|
||||
std::lock_guard<std::mutex> lock(samples_mutex);
|
||||
samples.insert(samples.end(), s.begin(), s.end());
|
||||
}
|
||||
}
|
||||
@@ -119,7 +119,7 @@ https://k2-fsa.github.io/sherpa/onnx/pretrained_models/index.html
|
||||
for a list of pre-trained models to download.
|
||||
|
||||
The device name specifies which microphone to use in case there are several
|
||||
on you system. You can use
|
||||
on your system. You can use
|
||||
|
||||
arecord -l
|
||||
|
||||
@@ -130,7 +130,7 @@ card 3: UACDemoV10 [UACDemoV1.0], device 0: USB Audio [USB Audio]
|
||||
Subdevices: 1/1
|
||||
Subdevice #0: subdevice #0
|
||||
|
||||
and if you want to select card 3 and the device 0 on that card, please use:
|
||||
and if you want to select card 3 and device 0 on that card, please use:
|
||||
|
||||
plughw:3,0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user