tag:blogger.com,1999:blog-20861261.post8086335676247588443..comments2023-09-01T01:59:34.240-07:00Comments on OpenSebJ by DSebJ: NAudio Tutorial 5 - Recording AudioOpenSebJhttp://www.blogger.com/profile/05952655132453138298noreply@blogger.comBlogger25125tag:blogger.com,1999:blog-20861261.post-29806765853110929122014-06-04T22:25:46.276-07:002014-06-04T22:25:46.276-07:00If we use NAudio to build a recording system to re...If we use NAudio to build a recording system to record 4 channels from MAudio 1010LT sound card simultaneously , the recording will be 24 a day, 7 days a week, and every hour the recorded byte will be saved in a WAV file. <br /><br />Could you anyone here help us about it? it is possible? and samples for us to refer to? <br /><br />ThanksTrungNEMOhttps://www.blogger.com/profile/08319066133067580587noreply@blogger.comtag:blogger.com,1999:blog-20861261.post-75557159566703864232012-11-13T07:19:03.564-08:002012-11-13T07:19:03.564-08:00Hey, i'm now doing a program to play music, i ...Hey, i'm now doing a program to play music, i would like to record what i am playing. How can i manage to record the output of the process ? or maybe the output of soundcard ?<br /><br />thanks a lot !!!<br /><br />my mail zazou370@hotmail.frAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-20861261.post-50835553687814365532012-08-19T00:49:34.957-07:002012-08-19T00:49:34.957-07:00Some changes:
waveInStream = new WaveIn(44100,2);...Some changes:<br /><br />waveInStream = new WaveIn(44100,2);<br /><br />to<br /><br /> WaveIn waveInStream = new WaveIn();<br />and then<br />waveInStream .WaveFormat = new WaveFormat(44100, 8, 1); //for example<br /><br />also...<br />writer.WriteData(e.Buffer, 0, e.BytesRecorded); //Obsolete<br /><br />to<br /><br />writer.Write(e.Buffer, 0, e.BytesRecorded);<br /> Richardhttps://www.blogger.com/profile/12835952600031242779noreply@blogger.comtag:blogger.com,1999:blog-20861261.post-81027102018779994672011-08-25T16:07:39.913-07:002011-08-25T16:07:39.913-07:00I'm trying to use the second part (stream to d...I'm trying to use the second part (stream to disk), but the Read() event isn't running, so my WaveFileWriter is receiving no data (the event isn't being called).Bram Osterhouthttps://www.blogger.com/profile/16669105874266147416noreply@blogger.comtag:blogger.com,1999:blog-20861261.post-78141471057728752912011-07-10T10:08:07.760-07:002011-07-10T10:08:07.760-07:00Hello,
The example program records nothing. It sa...Hello,<br /><br />The example program records nothing. It saves to file, but when the file is playing there is no sound. Is the example program supposed to record sound from soundboard only if there is "What you hear" device?<br /><br />Thanks.Alexeyhttps://www.blogger.com/profile/06920872067253567938noreply@blogger.comtag:blogger.com,1999:blog-20861261.post-4986186415783965592011-03-11T01:11:08.123-08:002011-03-11T01:11:08.123-08:00hello sebastian,
This is a great tutorial. However...hello sebastian,<br />This is a great tutorial. However, I'm trying to integrate the recording and the waveform together, like in http://voicerecorder.codeplex.com/.<br />The voice recorder is done in WPF, but I'm trying to develop a WinForm app. I've been looking at the voice recorder code and I wonder can you actually know the steps? It would be great if you could come up with a tutorial on that(recording and displaying the waveform). Thanks a lot!bennoreply@blogger.comtag:blogger.com,1999:blog-20861261.post-66155573151758286642010-12-21T21:43:57.815-08:002010-12-21T21:43:57.815-08:00Some more interesting comments recently, unfortuna...Some more interesting comments recently, unfortunately no means of contacting you about them.<br /><br />I'll look in to the idea of the direct to MP3 stream to disk recording - it may be possible now.OpenSebJhttps://www.blogger.com/profile/05952655132453138298noreply@blogger.comtag:blogger.com,1999:blog-20861261.post-18311506065030406032010-12-10T23:19:02.930-08:002010-12-10T23:19:02.930-08:00Can this method of streaming to disk be used for W...Can this method of streaming to disk be used for WaveIn from the soundcard. Perhaps I have a nice soundcard and it does a good job. <br />Or should the mixer be used always to get the different devices ..??Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20861261.post-39272741987474275092010-12-08T23:35:24.242-08:002010-12-08T23:35:24.242-08:00Ok you asked for a suggestion:
How about recordin...Ok you asked for a suggestion: <br />How about recording to disk with on the fly compression into something like OGG or MP3 ? In other words when I am recording - I do not want an 90MB wave file created at all not even in memory - I want something more manageable say 8-10MB compressed audio on disk. Can it be done ? Also I want to use a BAckgroundworker to do it with an example would be nice.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20861261.post-24144133757602694202010-11-17T02:42:05.859-08:002010-11-17T02:42:05.859-08:00Thanks, your tutorials are quite helpful. Regardin...Thanks, your tutorials are quite helpful. Regarding the recording code, i need to remove the stop button and stop the audio on its own after a fixed amount of time. how would i implement thisSatyaprateeknoreply@blogger.comtag:blogger.com,1999:blog-20861261.post-58162230776458190152010-11-14T22:41:38.094-08:002010-11-14T22:41:38.094-08:00This comment has been removed by a blog administrator.dancilhoneyhttps://www.blogger.com/profile/13841803841744674045noreply@blogger.comtag:blogger.com,1999:blog-20861261.post-72742592788427515912010-11-01T04:21:05.745-07:002010-11-01T04:21:05.745-07:00Hi,
Now i am able to capture sound and at the same...Hi,<br />Now i am able to capture sound and at the same time i send it over network like this<br /><br /> <br /><br />private void waveIn_DataAvailable(object sender, WaveInEventArgs e)<br /> { <br /> byte[] buffer = e.Buffer;<br /><br /> byte[] dataToWrite = ALawEncoder.ALawEncode(buffer);<br /><br /> if (socket_Audio != null)<br /> socket_Audio.SendTo(dataToWrite, new IPEndPoint(IPAddress.Parse(RemoteIpv6), SoundPort));<br /> <br /> }<br /><br /> <br /><br />Now the problem that i am facing is how to get back this audio at receiving end and and send it to the speaker of the system<br /><br />I am just starting a new thread for rxving data from network<br /><br /> myAudioThread = new Thread(new ThreadStart(AudioListener));<br /> myAudioThread.Start();<br /><br />And in the AudioListener() i use the following code<br /><br /> #region for Audio socket Its rxving audio always<br /> <br /> try<br /> {<br /><br /> socket_Audio = new Socket(AddressFamily.InterNetworkV6, SocketType.Dgram, ProtocolType.Udp);<br /><br /> socket_Audio.Bind(new IPEndPoint(IPAddress.IPv6Any, SoundPort));<br /> IPEndPoint remoteEP = new IPEndPoint(IPAddress.IPv6Any, SoundPort);<br /> //Receive data.<br /> <br /> byte[] byteData;<br /> while (true)<br /> {<br /><br /> byteData = new byte[2048];<br /> //Receive data.<br /> socket_Audio.Receive(byteData);<br /> <br /> //G711 compresses the data by 50%, so we allocate a buffer of double<br /> //the size to store the decompressed data.<br /> byte[] byteDecodedData = new byte[byteData.Length * 2];<br /><br /> //Decompress data using the proper vocoder.<br /> <br /> ALawDecoder.ALawDecode(byteData, out byteDecodedData);<br /><br /> <br /><br /> }<br /><br />Now the decoded audio is in the byte array byteDecodedData.How i send it to speaker of that system.<br /><br />I found only waveOut.Play() and<br /><br /> public override int Read(byte[] buffer, int offset, int count)<br /> {<br /><br /> //code to process data<br /><br /> }<br /><br /> in the examples<br /><br />Pls guide me to the next step....Pls let me know if i am in wrong path.<br /><br />Thanks<br /><br />JIbin<br />jibin.mn@hotmail.comJIbinnoreply@blogger.comtag:blogger.com,1999:blog-20861261.post-68542043698998020892010-07-25T13:03:24.466-07:002010-07-25T13:03:24.466-07:00Very interesting tutorial, at least to me, as a ne...Very interesting tutorial, at least to me, as a newbee to audio... Here is the question: I am developing an app that uses SKYPE4COM and wonder how can I record the conversations, that is, both parties or even conference calls. Can I use the first (simple) method presented in your tutorial, or the second (complex) one - without knowing much about audio I sense that despite multiple voice sources - mine from the mic and conversation's partner (from sound card?) it is not a mixed combo and the first method shouls suffice... Can you confirm?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20861261.post-36330429446092029692010-06-17T02:35:48.063-07:002010-06-17T02:35:48.063-07:00Hi, thanks for your fantastic library.
I need to ...Hi, thanks for your fantastic library.<br /><br />I need to calculate the frequency of the sound I record from the input device... How can I do it? Have I to use something like a FFT? I tried to calculate the frequency by counting the times wich te sound "touches" zero, dividing by 2 and dividing another time by the sample rate, but doesn't work...FBSChttps://www.blogger.com/profile/04033626858452369372noreply@blogger.comtag:blogger.com,1999:blog-20861261.post-59899566417215154162010-05-19T12:05:09.497-07:002010-05-19T12:05:09.497-07:00I can't get the example to record *all* sound ...I can't get the example to record *all* sound from everywhere - only from the microphone. Is this possible through NAudio?<br /><br />Many thanks for the project.<br /><br />Josh.JChttps://www.blogger.com/profile/00480996145824505367noreply@blogger.comtag:blogger.com,1999:blog-20861261.post-37254075981757266462010-02-17T22:06:03.083-08:002010-02-17T22:06:03.083-08:00Hi, I have used your example in my program, and it...Hi, I have used your example in my program, and its working great. However, I would like to implement a "record on sound detected" function. So is there any way to get the amplitude or threshold of the sound,and only record if it is over a certain limit? Need some guidance, as I am new to the sound stuff.Becozhttps://www.blogger.com/profile/04897315308380074813noreply@blogger.comtag:blogger.com,1999:blog-20861261.post-27038278097613385992010-01-29T17:39:55.670-08:002010-01-29T17:39:55.670-08:00@ SoundtrackFan; All of the modifications to that ...@ SoundtrackFan; All of the modifications to that DLL are covered in this and previous tutorials. If you want to reapply those changes to the latest version of NAudio you can do that by following the same approach as presented in the tutorials.<br /><br />@nathanroberton; Honestly not sure, haven't looked in to it myself. Probably best if you post that question on the NAudio discussion forum. http://naudio.codeplex.com/Thread/List.aspxOpenSebJhttps://www.blogger.com/profile/05952655132453138298noreply@blogger.comtag:blogger.com,1999:blog-20861261.post-54845595684546055682010-01-29T16:19:46.893-08:002010-01-29T16:19:46.893-08:00Does NAudio currently support analyzing the pitch ...Does NAudio currently support analyzing the pitch from a Microphone? Basically what I'm trying to do is the functionality in Rockband or SingStar (where you sing a song and the visual shows you how well you are doing in terms of being on Pitch).nathanrobertonhttps://www.blogger.com/profile/17897348673318764873noreply@blogger.comtag:blogger.com,1999:blog-20861261.post-62263566291620536512010-01-11T23:38:03.923-08:002010-01-11T23:38:03.923-08:00hi
could you please tell me how can i change wave ...hi<br />could you please tell me how can i change wave Encoding in WaveFormat class, i want to record wav file with ALaw encoding<br /><br />thankshosseinnoreply@blogger.comtag:blogger.com,1999:blog-20861261.post-67127674507974050862010-01-02T06:52:14.388-08:002010-01-02T06:52:14.388-08:00Is it possiable to use this library to create a re...Is it possiable to use this library to create a real time audio input? if yes how is it dont?<br /><br />thanks tristanAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-20861261.post-76050001374732716422009-06-23T23:37:50.501-07:002009-06-23T23:37:50.501-07:00Hi
I want to notify that the header(Specially &quo...Hi<br />I want to notify that the header(Specially "data") written by wavewriter is not written at correct position<br />It would be helpful if you could provide the source code for Naudio.dllAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-20861261.post-60179782741142749402009-06-09T11:03:32.133-07:002009-06-09T11:03:32.133-07:00Thanks a lot for the article, incredibly useful. C...Thanks a lot for the article, incredibly useful. Can I just check, there seems to be more than one version of the DLL? E.g. WaveIn only seems to work when linked to the DLL version 1.3.5 , and not version 1.2.144 which is the one supplied with the 'DLL Only' ZIP package.SoundtrackFanhttps://www.blogger.com/profile/13179146487538495916noreply@blogger.comtag:blogger.com,1999:blog-20861261.post-68723318416468659642009-06-02T06:51:10.220-07:002009-06-02T06:51:10.220-07:00How do you tell it what device to record from? Th...How do you tell it what device to record from? That seems to be totally missing. What if you have multiple mics?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20861261.post-20280305202831654422009-05-27T06:34:42.858-07:002009-05-27T06:34:42.858-07:00Oh right, nevermind. I looked back through the pr...Oh right, nevermind. I looked back through the previous tutorials and realize that they are meant to be followed in order. Sorry.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20861261.post-77217630014534281742009-05-27T06:30:52.707-07:002009-05-27T06:30:52.707-07:00Where is the WaveIn class in your example? I see ...Where is the WaveIn class in your example? I see that it it using AudioInterface but I don't know where AudioInterface is at. I apologize for the newbie question.Anonymousnoreply@blogger.com