Zao SDK for Jetson / libzep API Reference
Loading...
Searching...
No Matches
Sample Program ZaoAudioSinkAlsa

This is a sample program to send audio data received (Sink) from the cloud side to the Playback device recognized by ALSA for playback.

■ Build and Installation

Follow the build instructions to obtain audio-sink-alsa/ZaoAudioSinkAlsa. ZaoAudioSinkAlsa is not set up to run automatically depending on your SDK setup. Please enable zao-audio-sink.service and install the built binaries with the following command and restart Jetson.

$ sudo systemctl enable zao-audio-sink.service
$ sudo install -m 755 -o root -g root audio-sink-alsa/ZaoAudioSinkAlsa /usr/local/bin/

■ Command line options

ZaoAudioSinkAlsa -d <device> [-s <stream_name>] [-p <link-path>]
  • -d <device> : specify ALSA device name.
    • -d <device>: specifies a PCM device name enumerated by aplay -L, etc. * Example: -dplug httpd -L: specifies a PCM device name.
      • Example: -dplug hw:CARD=2.
    • This option is required.
  • -s <stream_name> : specify stream name.
    • -s <stream_name> : specify one stream name to connect to.
      • external : receive from additional external audio (send-back audio).
      • * Currently, only one type of this stream exists.
    • If omitted, external is used.
  • -p <link-path> : Specify a path for linking.
    • -p <link-path> : path for linking with ZaoRemoteEndpoint.
    • If omitted, it is unix:///run/zao/RemoteEndpoint.sock.

■ Main operations

  • To stop receiving and playing, type Ctrl-C.

■ Limitations.

  • The Playback device you select must support a sampling rate of 48 kHz and stereo output.