@picovoice/pvspeaker-node-demo

1.0.3 • Public • Published

PvSpeaker Demo for Node.js

This project contains a Node.js command-line demo for PvSpeaker that demonstrates how to use PvSpeaker to play audio from a WAV file.

PvSpeaker

PvSpeaker is an easy-to-use, cross-platform audio player designed for real-time speech audio processing. It allows developers to send raw PCM frames to an audio device's output stream.

Compatibility

  • Node.js 18+
  • Runs on Linux (x86_64), macOS (x86_64 and arm64), Windows (x86_64, arm64), and Raspberry Pi (3, 4, 5).

Installation:

To install the demos and make them available on the command line, use either of the following yarn or npm commands:

yarn global add @picovoice/pvspeaker-node-demo

(or)

npm install -g @picovoice/pvspeaker-node-demo

Usage

In the following instructions, we will refer to {AUDIO_DEVICE_INDEX} as the index of the audio device to use, and {INPUT_WAV_PATH} as the path to the pcm wav file that will be played.

{AUDIO_DEVICE_INDEX} defaults to -1 and {INPUT_WAV_PATH} must not be empty.

To show the available audio devices run:

pvspeaker-node-demo --show_audio_devices

To run PvSpeaker run:

pvspeaker-node-demo --audio_device_index {AUDIO_DEVICE_INDEX} --input_wav_path {INPUT_WAV_PATH}

Package Sidebar

Install

npm i @picovoice/pvspeaker-node-demo

Weekly Downloads

2

Version

1.0.3

License

Apache-2.0

Unpacked Size

6.09 kB

Total Files

3

Last publish

Collaborators

  • kyeo
  • kenarsa
  • ilavery
  • erismikpico
  • albho
  • matt200-ok
  • liuatpico
  • pico-mo