Skip to main content

Speaker library for Picovoice.

Project description

PvSpeaker Demo for Python

This project contains a Python 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

  • Python 3.8+
  • Runs on Linux (x86_64), macOS (x86_64 and arm64), Windows (x86_64), and Raspberry Pi (3, 4, 5).

Installation

pip3 install pvspeakerdemo

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:

pv_speaker_demo --show_audio_devices

To run PvSpeaker run:

pv_speaker_demo --audio_device_index {AUDIO_DEVICE_INDEX} --input_wav_path {INPUT_WAV_PATH}

Hit Ctrl+C if you wish to stop playing audio before it completes. If no audio device index (-d) is provided, the demo will use the system's default audio player device.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pvspeakerdemo-1.0.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

pvspeakerdemo-1.0.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file pvspeakerdemo-1.0.1.tar.gz.

File metadata

  • Download URL: pvspeakerdemo-1.0.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for pvspeakerdemo-1.0.1.tar.gz
Algorithm Hash digest
SHA256 962205a15e3ae32021f5accf201b3d3a194a949f5b780ebb6d5a5f296d32d67e
MD5 96f645c7aab6ea6c2e404df4fc036e7b
BLAKE2b-256 2302537b38d76bc81df13a0e5a4e66d8de3544927a9a56491f9a1b432e261325

See more details on using hashes here.

File details

Details for the file pvspeakerdemo-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pvspeakerdemo-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c0402ce7f392953a29182d5d3e4ab0cedbe8267fbb98881324df96a8e5a7809
MD5 b2681ef2920d7b7ed7c63459ec6a52f1
BLAKE2b-256 db23f5aee8ccfe6b7b8a53ada1f2c9c91b13789e309acfdea3912c4b531efcdd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page