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.2.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

pvspeakerdemo-1.0.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pvspeakerdemo-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ebed260fd8a554bc2d8eb9559da04648268285dbda568b25dbb13b68c009ab92
MD5 c3582fb2cc3360cb7e1f402e5f531158
BLAKE2b-256 8988a9091bbf11c89ba516c4dfb184086b0edd1cd01512287cdfb2a4bc4e72d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pvspeakerdemo-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f10b2146a5f6d20ef5a5be58a1416b96a262318ecb7c5e1f6dfb1da54c277615
MD5 9b074daf2777c7dab206b1753cb1260f
BLAKE2b-256 e582d8198314d3f580a4ad72a0cb56af9c908faa9c59b7e1c1d3ac34aa8be483

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