open-index/open-npm huggingface dataset:
npm package: @picovoice/cheetah-node
Description: Picovoice Cheetah Node.js binding
Author: Picovoice Inc.
Latest version: 4.0.0

# Cheetah Binding for Node.js

## Cheetah Speech-to-Text Engine

Made in Vancouver, Canada by [Picovoice](https://picovoice.ai)

Cheetah is an on-device streaming speech-to-text engine. Cheetah is:

- Private; All voice processing runs locally.
- Accurate [[1]](https://picovoice.ai/docs/benchmark/stt/#results)
- Compact and Computationally-Efficient [[2]](https://github.com/Picovoice/speech-to-text-benchmark#rtf)
- Cross-Platform:
    - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64, arm64)
    - Android and iOS
    - Chrome, Safari, Firefox, and Edge
    - Raspberry Pi (3, 4, 5)

## Compatibility

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

## Installation

```console
npm install @picovoice/cheetah-node
```

## AccessKey

Cheetah requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Cheetah SDKs.
You can get your `AccessKey` for free. Make sure to keep your `AccessKey` secret.
Signup or Login to [Picovoice Console](https://console.picovoice.ai/) to get your `AccessKey`.

### Usage

Create an instance of the engine and transcribe audio :

```javascript
const {Cheetah} = require("@picovoice/cheetah-node");

const accessKey = "${ACCESS_KEY}"; // Obtained from the Picovoice Console (https://console.picovoice.ai/)
const endpointDurationSec = 2.0;
const handle = new Cheetah(accessKey);

function getNextAudioFrame() {
  // ...
  return audioFrame;
}

while (true) {
  const audioFrame = getNextAudioFrame();
  const [partialTranscript, isEndpoint] = handle.process(audioFrame);
  if (isEndpoint) {
    finalTranscript = handle.flush()
  }
}
```

Replace `${ACCESS_KEY}` with yours obtained from [Picovoice Console](https://console.picovoice.ai/). Finally, when done be sure to explicitly release the resources using
`handle.release()`.

### Language Model

The Cheetah Node.js SDK comes preloaded with a default English language model (`.pv` file).
Default models for other supported languages can be found in [lib/common](../../lib/common).

Create custom language models using the [Picovoice Console](https://console.picovoice.ai/). Here you can train
language models with custom vocabulary and boost words in the existing vocabulary.

## Demos

[Cheetah Node.js demo package](https://www.npmjs.com/package/@picovoice/cheetah-node-demo)<!-- markdown-link-check-disable-line --> provides command-line utilities for processing audio using cheetah.
npm package: @picovoice/cheetah-node-demo
Description: Picovoice Cheetah Node.js file-based and microphone demos
Author: Picovoice Inc.
Latest version: 2.3.0

# Cheetah Speech-to-Text Demos

Made in Vancouver, Canada by [Picovoice](https://picovoice.ai)

## Cheetah

Cheetah is an on-device streaming speech-to-text engine. Cheetah is:

- Private; All voice processing runs locally.
- Accurate [[1]](https://picovoice.ai/docs/benchmark/stt/#results)
- Compact and Computationally-Efficient [[2]](https://github.com/Picovoice/speech-to-text-benchmark#rtf)
- Cross-Platform:
    - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64, arm64)
    - Android and iOS
    - Chrome, Safari, Firefox, and Edge
    - Raspberry Pi (3, 4, 5)

## Compatibility

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

## Installation

```console
npm install -g @picovoice/cheetah-node-demo
```

## AccessKey

Cheetah requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Cheetah SDKs.
You can get your `AccessKey` for free. Make sure to keep your `AccessKey` secret.
Signup or Login to [Picovoice Console](https://console.picovoice.ai/) to get your `AccessKey`.

## Usage

### File Demo

Run the following in the terminal:

```console
cheetah_demo_file --access_key ${ACCESS_KEY} --input_audio_file_path ${AUDIO_PATH}
```

Replace `${ACCESS_KEY}` with yours obtained from Picovoice Console and `${AUDIO_PATH}` with a path to an audio file you
wish to transcribe.

### Microphone Demo

You need a working microphone connected to your machine for this demo. Run the following in the terminal:

```console
cheetah_demo_mic --access_key ${ACCESS_KEY}
```

Replace `${ACCESS_KEY}` with yours obtained from Picovoice Console.

Now start recording and when done press `ENTER` key.
npm package: @picovoice/cobra-node
Description: Picovoice Cobra Node.js binding
Author: Picovoice Inc.
Latest version: 3.0.2

# Cobra Binding for Node.js

## Cobra Voice Activity Detection Engine

Made in Vancouver, Canada by [Picovoice](https://picovoice.ai)

Cobra is an on-device streaming voice activity detection engine. Cobra is:

- Private; All voice processing runs locally.
- Accurate [[1]](https://picovoice.ai/docs/benchmark/vad/#results)
- Cross-Platform:
    - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64, arm64)
    - Android and iOS
    - Chrome, Safari, Firefox, and Edge
    - Raspberry Pi (3, 4, 5)

## Compatibility

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

## Installation

```console
npm install @picovoice/cobra-node
```

## AccessKey

Cobra requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Cobra SDKs.
You can get your `AccessKey` for free. Make sure to keep your `AccessKey` secret.
Signup or Login to [Picovoice Console](https://console.picovoice.ai/) to get your `AccessKey`.

### Usage

Create an instance of the engine and detect voice activity in the audio:

Replace `${AccessKey}` with your AccessKey obtained from [Picovoice Console](https://console.picovoice.ai/). `cobra` is
an instance of Cobra.

```javascript
const { Cobra } = require("@picovoice/cobra-node");

const accessKey = "${ACCESS_KEY}"; // Obtained from the Picovoice Console (https://console.picovoice.ai/)
const cobra = new Cobra(accessKey);
```

Once initialized, the valid sample rate is given by `cobra.sampleRate`. The expected frame length (number of audio samples
in an input array) is `cobra.frameLength`. The engine accepts 16-bit linearly-encoded PCM and operates on
single-channel audio.

```javascript
function getNextAudioFrame() {
  // ...
  return audioFrame;
}

while (true) {
  const audioFrame = getNextAudioFrame();
  const voiceProbability = cobra.process(audioFrame);
  console.log(voiceProbability);
}
```

Finally, when done be sure to explicitly release the resources using
`cobra.release()`.

## Demos

The [Cobra Node.js demo package](https://www.npmjs.com/package/@picovoice/cobra-node-demo) <!-- markdown-link-check-disable-line --> provides command-line utilities for processing audio using Cobra.
npm package: @picovoice/cobra-node-demo
Description: Picovoice Cobra Node.js file-based and microphone demos
Author: Picovoice Inc.
Latest version: 3.0.1

# Cobra Voice Activity Detection Demos

Made in Vancouver, Canada by [Picovoice](https://picovoice.ai)

## Cobra

Cobra is an on-device voice activity detection engine. Cobra is:

- Private; All voice processing runs locally.
- Accurate [[1]](https://picovoice.ai/docs/benchmark/vad/#results)
- Cross-Platform:
    - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64, arm64)
    - Android and iOS
    - Chrome, Safari, Firefox, and Edge
    - Raspberry Pi (3, 4, 5)

## Compatibility

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

## Installation

```console
npm install -g @picovoice/cobra-node-demo
```

## AccessKey

Cobra requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Cobra SDKs.
You can get your `AccessKey` for free. Make sure to keep your `AccessKey` secret.
Signup or Login to [Picovoice Console](https://console.picovoice.ai/) to get your `AccessKey`.

## Usage

### File Demo

Run the following in the terminal:

```console
cobra-file-demo --access_key ${ACCESS_KEY} --input_audio_file_path ${AUDIO_PATH}
```

Replace `${ACCESS_KEY}` with yours obtained from Picovoice Console and `${AUDIO_PATH}` with a path to an audio file you
wish to use for voice activity detection.

The threshold of the engine can be tuned using the `threshold` input argument:

```console
cobra-file-demo --access_key ${ACCESS_KEY} --input_audio_file_path ${AUDIO_PATH} --threshold ${DETECTION_THRESHOLD}
```

Threshold is a floating point number within `[0, 1]`. A higher threshold reduces the miss rate at the cost of increased false alarm rate.

### Microphone Demo

You need a working microphone connected to your machine for this demo. Run the following in the terminal:

```console
cobra-mic-demo --access_key ${ACCESS_KEY}
```

Replace `${ACCESS_KEY}` with yours obtained from Picovoice Console.

To stop recording, press `Ctrl + C` or hit the `ENTER` key.
npm package: @picovoice/cobra-web-core
Description: Cobra types for web bindings
Author: Picovoice
Latest version: 1.1.0
Deprecated: This package is no longer supported. Please use @picovoice/cobra-web.

# Cobra-web-core

Package containing types for Cobra web bindings.

## Build 

To build Cobra typescript types, run:

```console
yarn
yarn build
```

This will build the types required for Cobra web and web-framework bindings.
npm package: @picovoice/leopard-node-demo
Description: Picovoice Leopard Node.js file-based and microphone demos
Author: Picovoice Inc.
Latest version: 2.0.6

# Leopard Speech-to-Text Demos

Made in Vancouver, Canada by [Picovoice](https://picovoice.ai)

## Leopard

Leopard is an on-device speech-to-text engine. Leopard is:

- Private; All voice processing runs locally.
- Accurate [[1]](https://picovoice.ai/docs/benchmark/stt/#results)
- Compact and Computationally-Efficient [[2]](https://github.com/Picovoice/speech-to-text-benchmark#rtf)
- Cross-Platform:
    - Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64, arm64)
    - Android and iOS
    - Chrome, Safari, Firefox, and Edge
    - Raspberry Pi (3, 4, 5)

## Compatibility

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

## Installation

```console
npm install -g @picovoice/leopard-node-demo
```

## AccessKey

Leopard requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Leopard SDKs.
You can get your `AccessKey` for free. Make sure to keep your `AccessKey` secret.
Signup or Login to [Picovoice Console](https://console.picovoice.ai/) to get your `AccessKey`.

## Usage

### File Demo

Run the following in the terminal:

```console
leopard-file-demo --access_key ${ACCESS_KEY} --input_audio_file_path ${AUDIO_FILE_PATH}
```

Replace `${ACCESS_KEY}` with yours obtained from Picovoice Console and `${AUDIO_FILE_PATH}` with a path to an audio file you
wish to transcribe.

### Microphone Demo

You need a working microphone connected to your machine for this demo. Run the following in the terminal:

```console
leopard-mic-demo --access_key ${ACCESS_KEY}
```

Replace `${ACCESS_KEY}` with yours obtained from Picovoice Console.

Now start recording and when done press `ENTER` key to get the transcription.
npm package: @picovoice/octopus-web-core
Description: Octopus types for web bindings
Author: Picovoice
Latest version: 1.0.0
Deprecated: This package is no longer supported. Please use @picovoice/octopus-web.

# Octopus-web-core

Package containing types for Octopus web bindings.

## Build 

To build Octopus typescript types, run:

```console
yarn
yarn build
```

This will build the types required for Octopus web and web-framework bindings.
npm package: @picovoice/orca-node-demo
Description: Picovoice Orca Node.js file-based and streaming demos
Author: Picovoice Inc.
Latest version: 3.0.0

# Orca Streaming Text-to-Speech Demos

Made in Vancouver, Canada by [Picovoice](https://picovoice.ai)

## Orca

Orca is an on-device streaming text-to-speech engine that is designed for use with LLMs, enabling zero-latency
voice assistants. Orca is:

- Private; All speech synthesis runs locally.
- Cross-Platform:
    - Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64)
    - Android and iOS
    - Chrome, Safari, Firefox, and Edge
    - Raspberry Pi (3, 4, 5)

## Compatibility

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

## Installation

```console
npm install -g @picovoice/orca-node-demo
```

## AccessKey

Orca requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Orca
SDKs. You can get your `AccessKey` for free. Make sure to keep your `AccessKey` secret.
Signup or Login to [Picovoice Console](https://console.picovoice.ai/) to get your `AccessKey`.

## Usage

Orca supports two modes of operation: streaming and single synthesis.

In the streaming synthesis mode, Orca processes an incoming text stream in real-time and generates audio in parallel.
This is demonstrated in the Orca streaming demo.

In the single synthesis mode, the text is synthesized in a single call to the Orca engine.

### Streaming synthesis demo

In this demo, we simulate a response from a language model by creating a text stream from a user-defined text.
We stream that text to Orca and play the synthesized audio as soon as it gets generated.

[@picovoice/pvspeaker-node](https://www.npmjs.com/package/@picovoice/pvspeaker-node) is used to play pcm audio generated<!-- markdown-link-check-disable-line -->
by Orca to your device's speakers.

Execute the following:

```console
orca-streaming-demo --access_key ${ACCESS_KEY} --model_file_path ${MODEL_FILE_PATH} --text_to_stream ${TEXT}
```

Replace `${ACCESS_KEY}` with your `AccessKey` obtained from Picovoice Console, `${MODEL_FILE_PATH}` with a path to any of the model files available under [lib/common](https://github.com/Picovoice/orca/tree/main/lib/common), and `${TEXT}` with your text to be streamed to Orca.

### Single synthesis demo

To synthesize speech in a single call to Orca and without audio playback, run the following:

```console
orca-file-demo --access_key ${ACCESS_KEY} --model_file_path ${MODEL_FILE_PATH} --text ${TEXT} --output_path ${WAV_OUTPUT_PATH}
```

Replace `${ACCESS_KEY}` with yours obtained from Picovoice Console, `${MODEL_FILE_PATH}` with a path to any of the model files available under [lib/common](https://github.com/Picovoice/orca/tree/main/lib/common), `${TEXT}` with your text to be synthesized, and `${WAV_OUTPUT_PATH}` with a path to a `.wav` file where the generated audio will be stored as a single-channel, 16-bit PCM `.wav` file.
npm package: @picovoice/picovoice-web-core
Description: Picovoice types for web bindings
Author: Picovoice
Latest version: 2.1.2
Deprecated: This package is no longer supported. Please use @picovoice/picovoice-web.

# Picovoice-web-core

Package containing types for Picovoice web sdks.

## Build 

To build Picovoice typescript types, run:

```console
yarn
yarn build
```

This will build the types required for Picovoice web and web-framework sdks.
npm package: @picovoice/porcupine-web-core
Description: Porcupine types for web bindings
Author: Picovoice
Latest version: 2.1.0
Deprecated: This package is no longer supported. Please use @picovoice/porcupine-web.

# porcupine-web-core

Package containing types for Porcupine web bindings. 

## Build 

To build Porcupine typescript types, run:

```console
yarn
yarn build
```

This will build the types required for Porcupine web and web-framework bindings.
npm package: @picovoice/porcupine_manager
Description: wake word detection & voice command engine running locally in browser
Author: Picovoice Inc.
Latest version: 1.3.0
Deprecated: no longer supported

# PorcupineManager

This is a library to recognize wake words and voice commands in the browser.

- Private, as it runs locally within the browser and the voice data does not leave the device.
- Real-time with minimal latency, as it does not depend on network calls.
- Optimized using WebAssembly for algorithm performance.

## Compatibility

PorcupineManager uses the [Web Audio API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API) and
[WebAssembly](https://webassembly.org/), which are supported on all modern browsers (excluding Internet Explorer).

## Installation

```bash
npm install porcupine-manager
```

## Usage

Add the following to your HTML:

```html
<script src="{PATH_TO_WEB_VOICE_PROCESSOR_JS}"></script>
<script src="{PATH_TO_PORCUPINE_MANAGER_JS}"></script>
```
Replace `{PATH_TO_WEB_VOICE_PROCESSOR_JS}` with path to `src/web_voice_processor.js`, which is a dependency of
`porcupine_manager` and replace `{PATH_TO_PORCUPINE_MANAGER_JS}` with the path to
[src/porcupine_manager.js](src/porcupine_manager.js).

### Instantiation

The library adds a class to the global scope that can be used to instantiate an instance:

```javascript
let porcupineWorkerScript = ... // Path to porcupine_worker.js within the package
let downsamplingWorkerScript = ... // Path to downsampling_worker.js script within web-voice-processor package

porcupineManager = PorcupineManager(porcupineWorkerScript, downsamplingWorkerScript);
```

### Start Processing

Start the detection process:

```javascript
porcupineManager.start(keywordIDs, sensitivities, detectionCallback, errorCallback)
```

`keywordIDs` is an array of keyword signatures to be detected. Each signature is an array of 8-bit unsigned integers
(i.e. `UInt8Array`). A number of signatures are available for free under the [resource folder](/resources/keyword_files) and
also within the [demo file](/demo/js/voiceControlDemo.js).

`sensitivities` is an array of 32-bit floating point numbers (i.e. `Float32Array`); each value corresponds to the
detection sensitivity for each keyword. A higher sensitivity results in a lower miss rate, at the cost of a higher
false positive rate. Sensitivity values are within `[0, 1]`. For more details, you can refer to the comments in the
[C library's header file](/include/pv_porcupine.h).

`detectionCallback` is called after processing each frame.

```javascript
let detectionCallback = function (keyword) {
    // do something ...
};
```

If no keyword is detected, the input argument will be `null`; otherwise, it corresponds to detected keyword.

`errorCallback` is executed when there is an error in the audio capture or processing logic.

### Stop Processing

```javascript
porcupineManager.stop()
```
npm package: @picovoice/pvrecorder-node
Description: Audio recorder sdk for Nodejs.
Author: Picovoice Inc.
Latest version: 1.2.8

# PvRecorder Binding for Node.js

## PvRecorder

PvRecorder is an easy-to-use, cross-platform audio recorder designed for real-time speech audio processing. It allows developers access to an audio device's input stream, broken up into data frames of a given size.

## Compatibility

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

## Installation

```console
yarn add @picovoice/pvrecorder-node
```

## Usage

Initialize and begin recording:

```javascript
const { PvRecorder } = require("@picovoice/pvrecorder-node");

const recorder = new PvRecorder(/*frameLength*/ 512);
recorder.start()
```

(or)

Use `get_available_devices()` to get a list of available devices and then initialize the instance based on the index of a device:

```javascript

const { PvRecorder } = require("@picovoice/pvrecorder-node");

const devices = PvRecorder.getAvailableDevices()

const recorder = new PvRecorder(512, /*device index*/0);
recorder.start()
```

Read frames of audio:

```javascript
while (recorder.isRecording) {
    // const frame = recorder.readSync(), for synchronous calls
    const frame = await recorder.read();
    // process audio frame
}
```

To stop recording, call `stop()` on the instance:

```javascript
recorder.stop();
```

Once you are done, free the resources acquired by PvRecorder. You do not have to call `stop()` before `release()`:

```javascript
recorder.release();
```

## Demos

[@picovoice/pvrecorder-node-demo](https://www.npmjs.com/package/@picovoice/pvrecorder-node-demo) provides command-line utilities for recording audio to a file.
npm package: @picovoice/pvrecorder-node-demo
Description: Picovoice PvRecorder demo
Author: Picovoice, Inc.
Latest version: 1.2.8

# PvRecorder Demo for Node.js

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

## PvRecorder

PvRecorder is an easy-to-use, cross-platform audio recorder designed for real-time speech audio processing. It allows developers access to an audio device's input stream, broken up into data frames of a given size.

## Compatibility

- Node.js 18+
- Runs on Linux (x86_64), macOS (x86_64 and arm64), Windows (x86_64 and 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:

```console
yarn global add @picovoice/pvrecorder-node-demo
```

(or)

```console
npm install -g @picovoice/pvrecorder-node-demo
```

## Usage

In the following instructions, we will refer to  `{AUDIO_DEVICE_INDEX}` as the index of the audio device to use, and `{OUTPUT_WAV_PATH}` as the file path to save the audio data in `wav` format.

`{AUDIO_DEVICE_INDEX}` defaults to -1 and `{OUTPUT_WAV_PATH}` can be empty if you wish to not save any data.

To show the available audio devices run:

```console
pvrecorder-node-demo --show_audio_devices
```

To run the audio recorder:

```console
pvrecorder-node-demo --audio_device_index {AUDIO_DEVICE_INDEX} --output_wav_path {OUTPUT_WAV_PATH}
```
npm package: @picovoice/pvspeaker-node
Description: Audio player sdk for Nodejs.
Author: Picovoice Inc.
Latest version: 1.0.3

# PvSpeaker Binding for Node.js

## 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

```console
yarn add @picovoice/pvspeaker-node
```

## Usage

Initialize and start `PvSpeaker`:

```javascript
const { PvSpeaker } = require("@picovoice/pvspeaker-node");

const sampleRate = 22050;
const bitsPerSample = 16;
const speaker = new PvSpeaker(sampleRate, bitsPerSample);

speaker.start()
```

(or)

Use `getAvailableDevices()` to get a list of available devices and then initialize the instance based on the index of a device:

```javascript

const { PvSpeaker } = require("@picovoice/pvspeaker-node");

const devices = PvSpeaker.getAvailableDevices()

const sampleRate = 22050;
const bitsPerSample = 16;
const deviceIndex = 0;
const speaker = new PvSpeaker(sampleRate, bitsPerSample, { deviceIndex });

speaker.start()
```

Write PCM data to the speaker:

```typescript
function getNextAudioFrame(): ArrayBuffer {
    //
}

speaker.write(getNextAudioFrame())
```

Note: the `write()` method only writes as much PCM data as the internal circular buffer can currently fit, and returns the length of the PCM data that was successfully written.

When all frames have been written, run `flush()` to wait for all buffered PCM data (i.e. previously buffered via `write()`) to be played:

```typescript
speaker.flush()
```

Note: calling `flush()` with PCM data as an argument will both write that PCM data and wait for all buffered PCM data to finish.

```typescript
function getRemainingAudioFrames(): ArrayBuffer {
    //
}

speaker.flush(getRemainingAudioFrames())
```

To stop the audio output device, run `stop()`:

```typescript
speaker.stop();
```

Once you are done (i.e. no longer need PvSpeaker to write and/or play PCM), free the resources acquired by PvSpeaker by calling `release`. You do not have to call `stop` before `release`:

```typescript
speaker.release();
```

## Demos

[@picovoice/pvspeaker-demo](https://www.npmjs.com/package/@picovoice/pvspeaker-demo) provides command-line utilities for playing audio from a file.
npm package: @picovoice/pvspeaker-node-demo
Description: Picovoice PvSpeaker demo
Author: Picovoice, Inc.
Latest version: 1.0.3

# 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:

```console
yarn global add @picovoice/pvspeaker-node-demo
```

(or)

```console
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:

```console
pvspeaker-node-demo --show_audio_devices
```

To run PvSpeaker run:

```console
pvspeaker-node-demo --audio_device_index {AUDIO_DEVICE_INDEX} --input_wav_path {INPUT_WAV_PATH}
```
npm package: @picovoice/rhino-web-core
Description: Rhino types for web bindings
Author: Picovoice
Latest version: 2.1.2
Deprecated: This package is no longer supported. Please use @picovoice/rhino-web.

# Rhino-web-core

Package containing types for Rhino web bindings.

## Build 

To build Rhino typescript types, run:

```console
yarn
yarn build
```

This will build the types required for Rhino web and web-framework bindings.
npm package: @picovoice/rhino_manager
Description: domain-specific natural language understanding engine running locally in browser
Author: Picovoice Inc.
Latest version: 1.3.0
Deprecated: no longer supported

# RhinoManager

This is a library for inferring intent from speech in the browser.

- Private, as it runs locally within the browser and the voice data does not leave the device.
- Real-time with minimal latency, as it does not depend on network calls.
- Optimized using WebAssembly for algorithm performance.

## Compatibility

RhinoManager uses the [Web Audio API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API) and
[WebAssembly](https://webassembly.org/), which are supported on all modern browsers (excluding Internet Explorer).

## Installation

```bash
npm install rhino-manager
```

## Usage

Add the following to your HTML:

```html
<script src="{PATH_TO_WEB_VOICE_PROCESSOR_JS}"></script>
<script src="{PATH_TO_RHINO_MANAGER_JS}"></script>
```
Replace `{PATH_TO_WEB_VOICE_PROCESSOR_JS}` with path to `src/web_voice_processor.js`, which is a dependency of
`rhino-manager` and replace `{PATH_TO_RHINO_MANAGER_JS}` with the path to
[src/rhino_manager.js](src/rhino_manager.js).

### Instantiation

The library adds a class to the global scope that can be used to instantiate an instance:

```javascript
let rhinoWorkerScript = ... // Path to rhino_worker.js within the package
let downsamplingWorkerScript = ... // Path to downsampling_worker.js script within web-voice-processor package

rhinoManager = RhinoManager(rhinoWorkerScript, downsamplingWorkerScript);
```

### Start Processing

Start the detection process:

```javascript
rhinoManager.start(context, inferenceCallback, errorCallback)
```

`context` A context represents the set of expressions (spoken commands), intents, and intent arguments (slots) within a
domain of interest. For more details, you can refer to the comments in the [C library's header file](/include/pv_rhino.h).

`detectionCallback` is called after intent inference is finalized.

```javascript
let detectionCallback = function (info) {
    // do something ...
};
```

`errorCallback` is executed when there is an error in the audio capture or processing logic.

### Stop Processing

```javascript
rhinoManager.stop()
```
npm package: @picoxr/web-cli
Description: Client CLI tool to Generate TWA projects from a Web Manifest
Latest version: 0.0.5-alpha.1

## picoxr-web
Client CLI tool to Generate TWA projects from a Web Manifest or a local Manifest json file
## Requirements
- [Node.js](https://nodejs.org/en/) 14.15.0 or above
## Setting up the Environment
When running picoxr-web for the first time, it will offer to automatically download and install
external dependencies.
## Installation
Using npm:
```shell
npm i -g @picoxr/web-cli
```
## Usage
### Bundle the Manifest file to a Android Application
```shell
picoxr-web build --manifest-url=https://my-twa.com/manifest.json
```
or
```shell
picoxr-web build --manifest=/path/to/local/manifest.json
```
This command gets the Manifest file from the website or locally, and generates the Android application to the current directory.Make sure your user has write permissions to the current directory.Note that the start_url in the local file must be an accessible http website.
## Commands
The diagram above shows which commands we offered to help generate Android Application.
## `build`
Usage:
```
picoxr-web build --manifest-url="<manifest-url>"
```
or 
```
picoxr-web build --manifest="<local-manifest-path>"
```
Params:
- --manifest-url: manifest url
- --manifest: local manifest path
## `check`
Usage:
```
picoxr-web check --url="<url>"
```
Params:
- --url: url to check
## Support
Tested in  Node.js 14-16.
npm package: @picoxr/web-cli-core
Description: Core Library to generate, build and sign TWA projects
Latest version: 0.0.5-alpha.1

# @picoxr/web-cli-core
Core Library to generate, build and sign TWA projects
# Installation
Using npm:
```
$ npm i -g npm
$ npm i -g @picoxr/web-cli-core
```
In Node.js:
```
import {Config} from '@picoxr/web-cli-core';
```
# Support
Tested in  Node.js 14-16.
npm package: @picoxr/web-cli-validator
Description: Validate if an web site can be installed as a PWA application
Latest version: 0.0.5-alpha.1

# @picoxr/web-cli-validator
Validate if an web site can be installed as a PWA application
# Installation
Using npm:
```
$ npm i -g npm
$ npm i -g @picoxr/web-cli-validator
```
In Node.js:
```
import {installableValidator} from '@picoxr/web-cli-validator';
```
# Support
Tested in  Node.js 14-16.