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.9+
  • Runs on Linux (x86_64), macOS (x86_64 and arm64), Windows (x86_64, arm64), 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.5.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pvspeakerdemo-1.0.5.tar.gz
Algorithm Hash digest
SHA256 208ddee87007e51e4b981aee7cfd09e0e5f318e0329da5e5a3619f2dfe0b5df0
MD5 e076c2ec2f79eed91a5cb99f1105e7b9
BLAKE2b-256 4e3ee4d1698f346c292b61917ecd29a0622ea6573c212c0210eca8275fc41449

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pvspeakerdemo-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pvspeakerdemo-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8aa25b2476056293a44e40b3b0e2cf477d1c5c58d0299663d79a1909d4b28e58
MD5 6525d5fd446c0f5d34343f4eb14aac3d
BLAKE2b-256 b4753799ea7ec6440a8e62c7cb1e38dec9077d7bf4d9b7028ae8d4ab95a407d9

See more details on using hashes here.

Supported by

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