PvRecorder 1.2.6

dotnet add package PvRecorder --version 1.2.6                
NuGet\Install-Package PvRecorder -Version 1.2.6                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PvRecorder" Version="1.2.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PvRecorder --version 1.2.6                
#r "nuget: PvRecorder, 1.2.6"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PvRecorder as a Cake Addin
#addin nuget:?package=PvRecorder&version=1.2.6

// Install PvRecorder as a Cake Tool
#tool nuget:?package=PvRecorder&version=1.2.6                

PvRecorder Binding for .NET

PvRecorder

PvRecorder is an easy-to-use, cross-platform audio recorder designed for real-time speech audio processing. It allows developers access to an audio device's input stream, broken up into data frames of a given size.

Requirements

  • .NET 8.0

Compatibility

Platform compatible with .NET Framework 4.6.1+:

  • Windows (x86_64)

Platforms compatible with .NET Core 2.0+:

  • Linux (x86_64)
  • macOS (x86_64)
  • Windows (x86_64)

Platforms compatible with .NET Core 3.0+:

  • Raspberry Pi:
    • 3 (32 and 64 bit)
    • 4 (32 and 64 bit)
    • 5 (32 and 64 bit)

Platform compatible with .NET 6.0+:

  • macOS (arm64)

Installation

You can install the latest version of PvRecorder by adding the latest PvRecorder Nuget package in Visual Studio or using by using the .NET CLI:

dotnet add package PvRecorder

Usage

Initialize and begin recording:

using Pv;

PvRecorder recorder = PvRecorder.Create(frameLength: 512);
recorder.Start();

Read frames of audio:

while (recorder.IsRecording)
{
    short[] frame = recorder.Read();
    // process audio frame
}

To stop recording:

recorder.Stop();

Once you are done, free the resources acquired by PvRecorder. You do not have to call Stop() before Dispose():

recorder.Dispose();

To have resources freed immediately after use without explicitly calling the Dispose() function, wrap PvRecorder in a using statement:

using (PvRecorder recorder = PvRecorder.Create(frameLength: 512)) {
    // PvRecorder usage
}

Selecting an Audio Device

To print a list of available audio devices:

string[] devices = PvRecorder.GetAudioDevices();

The index of the device in the returned list can be used in Create() to select that device for audio capture:

PvRecorder recorder = PvRecorder.Create(
    frameLength: 512,
    deviceIndex: 2);

Demo

The PvRecorder .NET demo is a .NET command-line application that demonstrates how to use PvRecorder to record audio to a file.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 is compatible.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.0

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • net6.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.6 766 9/13/2024
1.2.5 2,556 1/30/2024
1.2.4 1,115 8/30/2023
1.1.1 1,950 6/13/2022
1.1.0 531 5/12/2022
1.0.0 920 9/1/2021