This project contains a .NET command-line demo for PvSpeaker that demonstrates how to use PvSpeaker to play audio from a WAV file.
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.
- .NET 8.0
- Linux (x86_64)
- macOS (x86_64, arm64)
- Windows (x86_64)
- Raspberry Pi:
- 3 (32 and 64 bit)
- 4 (32 and 64 bit)
- 5 (32 and 64 bit)
This demo uses Microsoft's .NET SDK.
Build with the dotnet CLI:
dotnet build
To build the demo:
cd demo/dotnet/PvSpeakerDemo
dotnet build
To show the available audio devices run:
dotnet run -- --show_audio_devices
To run the demo, give it a file from which to play audio:
dotnet run -- --input_wav_path ${INPUT_WAV_FILE}
You can also select the audio device index to use for playback (use --show_audio_devices
to see options):
dotnet run -- --input_wav_path ${INPUT_WAV_FILE} --audio_device_index ${DEVICE_INDEX}