
Research
Security News
Malicious npm Packages Use Telegram to Exfiltrate BullX Credentials
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
PvSpeaker is a cross-platform audio player for .NET designed for real-time speech audio playback.
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.
Platform compatible with .NET Framework 4.6.1+:
Platforms compatible with .NET Core 2.0+:
Platform compatible with .NET 6.0+:
Raspberry Pi:
Linux (x86_64)
Windows (arm64)
macOS (arm64)
You can install the latest version of PvSpeaker by adding the latest PvSpeaker Nuget package in Visual Studio or using by using the .NET CLI:
dotnet add package PvSpeaker
Initialize and start PvSpeaker
:
using Pv;
var speaker = new PvSpeaker(
sampleRate: 22050,
bitsPerSample: 16);
speaker.Start();
Write PCM data to the speaker:
public static byte[] GetNextAudioFrame() { }
int writtenLength = speaker.Write(GetNextAudioFrame());
Note: the Write()
method only writes as much PCM data as the internal circular buffer can currently fit, and returns the number of samples that were 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:
int flushedLength = 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.
public static byte[] GetRemainingAudioFrames() { }
int flushedLength = speaker.Flush(GetRemainingAudioFrames());
To stop the audio output device, run Stop()
:
speaker.Stop();
Once you are done, free the resources acquired by PvSpeaker. You do not have to call Stop()
before Dispose()
:
speaker.Dispose();
To have resources freed immediately after use without explicitly calling the Dispose()
function, wrap PvSpeaker
in a using
statement:
using (var speaker = new PvSpeaker(sampleRate: 22050, bitsPerSample: 16)) {
// PvSpeaker usage
}
To print a list of available audio devices:
string[] devices = PvSpeaker.GetAudioDevices();
The index of the device in the returned list can be used in Create()
to select that device for audio playback:
var speaker = new PvSpeaker(
sampleRate: 22050,
bitsPerSample: 16,
deviceIndex: 2);
The PvSpeaker .NET demo is a .NET command-line application that demonstrates how to use PvSpeaker to play audio from a WAV file.
FAQs
PvSpeaker is a cross-platform audio player for .NET designed for real-time speech audio playback.
We found that pvspeaker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.
Security News
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.