Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add C++ microphone examples for audio tagging #749

Merged
merged 8 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
small fixes
  • Loading branch information
csukuangfj committed Apr 10, 2024
commit 8f7bd98c95b3fd45f072a5e3f15b797b8d11a308
2 changes: 1 addition & 1 deletion c-api-examples/asr-microphone-example/c-api-alsa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def get_args():
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

Expand Down
2 changes: 1 addition & 1 deletion python-api-examples/vad-alsa.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_args():
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

Expand Down
2 changes: 1 addition & 1 deletion python-api-examples/vad-remove-non-speech-segments-alsa.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def get_args():
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

Expand Down
2 changes: 1 addition & 1 deletion sherpa-onnx/csrc/alsa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,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

Expand Down
6 changes: 3 additions & 3 deletions sherpa-onnx/csrc/sherpa-onnx-alsa-offline-audio-tagging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ wget https://github.com/k2-fsa/sherpa-onnx/releases/download/audio-tagging-model
tar xvf sherpa-onnx-zipformer-audio-tagging-2024-04-09.tar.bz2
rm sherpa-onnx-zipformer-audio-tagging-2024-04-09.tar.bz2

./bin/sherpa-onnx-microphone-offline-audio-tagging \
./bin/sherpa-onnx-alsa-offline-audio-tagging \
--zipformer-model=./sherpa-onnx-zipformer-audio-tagging-2024-04-09/model.onnx \
--labels=./sherpa-onnx-zipformer-audio-tagging-2024-04-09/class_labels_indices.csv \
device_name
Expand All @@ -100,7 +100,7 @@ Please refer to
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

Expand All @@ -111,7 +111,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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,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
as the device_name.

Expand Down
4 changes: 2 additions & 2 deletions sherpa-onnx/csrc/sherpa-onnx-alsa-offline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Please refer to
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

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion sherpa-onnx/csrc/sherpa-onnx-alsa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,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

Expand Down
4 changes: 2 additions & 2 deletions sherpa-onnx/csrc/sherpa-onnx-keyword-spotter-alsa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Please refer to
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

Expand All @@ -51,7 +51,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

Expand Down
2 changes: 1 addition & 1 deletion sherpa-onnx/csrc/sherpa-onnx-vad-alsa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,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

Expand Down