Questions tagged [naudio]

NAudio is an open source audio library for .NET, supporting audio playback, recording and sample manipulation as well as reading and writing various audio file formats.

NAudio is an open source .NET audio and MIDI library, containing dozens of useful audio related classes intended to speed development of audio related utilities in .NET. It has been in development since 2002 and has grown to include a wide variety of features. While some parts of the library are relatively new and incomplete, the more mature features have undergone extensive testing and can be quickly used to add audio capabilities to an existing .NET application. NAudio can be quickly added to your .NET application using NuGet.

Features:

  • Play back audio using a variety of APIs
  • WaveOut
  • DirectSound
  • ASIO
  • WASAPI (Windows Vista and above)
  • Decompress audio from different Wave Formats
  • MP3 decode using ACM or DMO codec
  • AIFF
  • G.711 mu-law and a-law
  • ADPCM
  • G.722
  • Speex (using NSpeex)
  • SF2 files
  • Decode using any ACM codec installed on your computer
  • Record audio using WaveIn, WASAPI or ASIO
  • Read and Write standard .WAV files
  • Mix and manipulate audio streams using a 32 bit floating mixing engine
  • Extensive support for reading and writing MIDI files
  • Full MIDI event model
  • Basic support for Windows Mixer APIs
  • A collection of useful Windows Forms Controls
  • Some basic audio effects, including a compressor

Official Website: http://naudio.codeplex.com/

Official Website on github: https://github.com/naudio/NAudio

Useful Links:

FAQ:

1557 questions
0
votes
1 answer

Reading samples directly from a converted MP3 file using NAudio

I am trying to read PCM samples from a (converted) MP3 file using NAudio, but failing as the Read method returns zero (indicating EOF) every time. Example: this piece of code, which attempts to read a single 16-bit sample, always prints "0": using…
finnw
  • 47,861
  • 24
  • 143
  • 221
0
votes
1 answer

Google TTS string issue on c#

I am using google text to speech (TTS). Guys you all know it has only 100 character string support at a time. I have implemented TTS part correctly but not for greater than 100 characters. So as I said I'll get exception. public void Read(string…
0
votes
1 answer

NAudio Plot waveform while recording in WaveViewer control

Can we use waveViever to plot waveform while recording? private NAudio.Wave.WaveIn wi = null; int waveInDevices = NAudio.Wave.WaveIn.DeviceCount; WaveFileWriter waveWriter = null; SaveFileDialog save; private void…
Blast
  • 955
  • 1
  • 17
  • 40
0
votes
1 answer

Play from Memorystream, stop when reached end and start recording again

I am using NAudio, and i am currently playing around. And now, i have a problem. I record my mic to a memorystream. When i click a button, it stops recording (to prevent write and read at the same time) And play from that memorystream. But i don´t…
Zerowalker
  • 761
  • 2
  • 8
  • 27
0
votes
1 answer

Bug with repeat sine sound

What is my code: void SpeakThreadFunction() { while (SpeakThreadState) { Speaker.Play(); Thread.Sleep(100); Speaker.Stop() Thread.Sleep(Interval); } } //Speaker is…
Alexander Mashin
  • 693
  • 3
  • 14
  • 34
0
votes
1 answer

Sending .Wav file over the network using NAudio

I am working with NAudio to send audio files .wav to be exact from one pc to another. I have tried sending the message over the network stream but i have no way of checking whether the message had been sent correctly or not because so far i am…
Win Coder
  • 6,628
  • 11
  • 54
  • 81
0
votes
1 answer

how to change sample rate in wave file using c#

i have try to use Naudio library and write this code in c# to change sample rate in wave file but nothing happened so any one have an idea why this not working or there another way to do this in C# or Java using (var reader = new…
Fadi
  • 2,320
  • 8
  • 38
  • 77
0
votes
1 answer

Naudio - Count the times audio level rises above a level

I'm pretty new to this so I'll try to explain as best I can. I want to count the number of times the audio level goes above a certain level. I have found/created some code which can detect if the level has gone above a certain threshold, but can't…
0
votes
1 answer

Recording audio using NAudio in WPF C#

I saw Mark Heath 's blog on NAudio however it is difficult for beginners like me to understand . I have a WPF page xaml file that consist of a Record , Stop and Save button , How do i write NAudio to the buttons to Record the audio to a wav file and…
user2376998
  • 1,061
  • 7
  • 32
  • 65
0
votes
2 answers

C# Real time waveform data plot using NAudio

I am new on processing wav file and C#.My goal is to real time data plotting in waveform of wavfile.I mean while recording sound(wav) file,i want to plot its graph simultaneously.I searched some sound libiraries and decide to use NAudio.(Dont know…
Blast
  • 955
  • 1
  • 17
  • 40
0
votes
1 answer

Using NAudio to achieve fade out and fade in for a series of 44 kHz 16-bit two-channel wave files

I have a series of 44 kHz 16-bit two-channel uncompressed wave files (read from resources) and want to apply the fade out and fade in effect to create a stream from the sequence of all the WAV files. The resource reading, and getting the 16-bit…
0
votes
2 answers

VB.net nAudio WaveIn stream to ftp

okay so here is the deal.. I am capturing the audio stream from microphone via naudio WaveIn method.. Now this allows me to save my capture straight into a wav file continuously. Now i want this wav to be continuously uploaded on my ftp account. i.e…
0
votes
1 answer

Using the WaveformTimeline Control in the WPF Sound Visualisation Library

I am having problems using the WaveformTimeLine class in the WPF Sound Visualization Library using the NAUDIO class library.I have followed the instructions they have put out in their documentation but it's just not working for me. My code behind…
KillaKem
  • 995
  • 1
  • 13
  • 29
0
votes
1 answer

Live Audio Stream is Delayed

I'm creating a kind of live video streaming application and using a number of different libraries. I'm using NAudio for unpacking the audio stream as it comes in. I found on their discussion boards this thread which I utilised like so; …
windowsgm
  • 1,566
  • 4
  • 23
  • 55
0
votes
1 answer

play audio byte stream coming from android device using NAudio

For the test purpose I have implemented the c# code just to play a single segment of a buffer (by doing it in a while loop I can read the whole data coming from socket and play) I used this three versions of nAudio (v1.2, v1.3, v1.7) The three…
sandSK
  • 3
  • 4