Click here to Skip to main content
15,889,216 members
Everything / Multimedia / Audio

Audio

audio

Great Reads

by Andy Allinger
Convert audio to image. (Edit the image.) Convert image to music.
by honey the codewitch
Provides a complete managed API for working with MIDI files, sequences and devices
by Steve Hoult
Creation of an Audio analysis framework to enable developers with little to no understanding of audio analysis to develop audio-driven games
by ljw1004
How to use UPnP on Windows 8

Latest Articles

by Andy Allinger
Convert audio to image. (Edit the image.) Convert image to music.
by ToughDev
How to interface VS1053 Audio Encoder/Decoder Module with PIC using SPI
by honey the codewitch
Mix wavs and waveforms with this simple to use library
by Vishwas_R
Simple Audio Player to browse any song with Play / Pause, Stop options & a waveform generated using CanvasJS charts

All Articles

Sort by Title

Audio 

5 Oct 2014 by Grasshopper.iics
Learn Text to Speech, Speech Recognition, Audio Recording and Audio Playback with the most simple Android Audio Tutorial
22 Mar 2020 by honey the codewitch
Slice sections out of a MIDI file, and stretch or compress playback time using this simple utility. Or use the Midi Library to build your own MIDI apps
17 Feb 2012 by potluri_suresh
Raw Audio data is encoded to AAC compression using ffmmpeg library.
12 Dec 2011 by Gene Pharr
I have an audio application that works just fine on XP.But on Windows 7, acmStreamConvert malfunctions and trashes all of it's conversion results.The bytestream in the returned converted buffer is nothing but "BF C5" over and over again.I *AM* checking the return value of the call to...
1 Jun 2022 by Member 15658863
i want to improve this project, i shared the link of it down below. In the link that i shared i want to improve the project where i want to add a voice output when the digit gets recognised for example in the screnshots shown there are the...
1 Jun 2022 by Richard MacCutchan
What did you search for? Google has lots of hits python speech output - Google Search[^].
9 Nov 2021 by Oyinda Sangowawa
Hello. I'm new to coding. I'm trying to add an audio file to a code as practice. I have a file in mind, but I don't know how to add it to the code. I'd really appreciate a step by step answer please What I have tried: ...
9 Nov 2021 by OriginalGriff
Exactly how you would do that will depend on the language and environment you are working with: a web-based solution would be very different to a WinForms solution for example, and a PHP or WPF solution would be different again. So start by...
7 Aug 2011 by bbkpl
Hi, I need help with my c# program. Speaking to a microphone, I want to sound was processed by Fourier Transform (I think the parties should be thrown to the buffer, processed and deposited into speakers), this should work at all in real time, saying I would hear my voice through the...
15 Jul 2021 by Steve Hoult
Creation of an Audio analysis framework to enable developers with little to no understanding of audio analysis to develop audio-driven games
14 Nov 2013 by xchris00
HelloI’m really new in java programming. I’m trying to build an android application that will be enabled by NFC, record sound (during sleep) continuously (in separated files of 1-2 minutes length and then start a new recording file), uploading each one of them (right after it’s recorded) on...
24 Jun 2013 by mkaatr2
Dear Sirs...I am trying to create a simple voip application using android. The settings are as follows:1- Two android machines are being used: A phone, and a tablet.2- Both machines are connected via "Wi-Fi Direct"3- The connectivity is working perfectly fine and I can send and...
24 Jun 2013 by mkaatr2
Hi there...I figured out the solution. First the way I used to convert values back from short to byte is totally wrong. In addition I had an impression that byte value in java is from 0 to 255, however it is from -128 to +127so I had to modify the client, and just pass the array at the...
14 Jan 2016 by Android on Intel
This document explains how Android low-latency audio is implemented on x86 devices starting with the Intel® Atom™ processor-based (codenamed Bay Trail) platform.
18 Sep 2018 by prafull agrawal
I am working on an android app in which I want to record user voice in wav format and do processing on it. I want sample rate of 22050Hz and 16 bit signed format with mono channel. I got some code by searching on google and integrated the same in my app but as I run my app it gives me 3...
3 Jan 2016 by ridoy
I would suggest you 2 things here: 1. Use before tag, not after of it. 2. Have you run this once and not called recordInstance.release()? If so you may have tied up audio resources and it...
18 Sep 2018 by Member 13989987
You should use this method for your problem. @RequiresApi(api = Build.VERSION_CODES.M) public void getPermissionToRecordAudio() { // 1) Use the support library version ContextCompat.checkSelfPermission(...) to avoid // checking the build version since...
5 Jul 2013 by hirosht
Please be kind enough to not to say this as a silly question. Honestly asking after refering to several links on google.I am in need of a API which generates MIDI tone/tune in C#. Currently I'm implementing a "Basic Optical Music Recogntion and Interpreting Application" without any OMR API...
6 Jul 2013 by Richard MacCutchan
Take a look at C# MIDI Toolkit[^].
11 Dec 2020 by OriginalGriff
This is one of the most common problems we get asked, and it's also the one we are least equipped to answer, but you are most equipped to answer yourself. Let me just explain what the error means: You have tried to use a variable, property, or a...
14 Jul 2020 by honey the codewitch
Continuing our series with a knob control and a MIDI visualizer
11 Apr 2015 by Member 11598975
I am attempting to play a sound from a custom marker on Google Maps, I am pulling in the longitude, latitude and the audio file name from my database and I am trying to play the corresponding audio file from my directory when the marker is clicked, here is what I have so far.
28 May 2011 by Nyx.Carpenter
Hi all,I'm currently working on a program that analyses a wav file of a solo musician playing an instrument and detects the notes within it. To do this it performs an FFT and then looks at the data produced. The goal is to (at some point) produce the sheet music by writing a midi...
28 May 2011 by dasblinkenlight
The problem is somewhat similar to DTMF recognition (figuring out "two-sound chords" produced by telephone buttons). A very efficient Goertzel Algorithm[^] is used rather widely for that. It may or may not help you solve the problem at hand, but it's definitely worth giving a try. Good luck!
1 Jun 2011 by Nyx.Carpenter
Musical phenomenons - notes of the frequency being played may contain occurrences of the note's higher octaves. E.G. A440 (440Hz) may contain instances of A5 (880Hz) and A6 (1760Hz) etc. I've found this is more likely the lower the note gets.
3 Jul 2011 by Albert Holguin
This is an interesting project, but I can tell you you'll end up having a really hard time identifying chords, since you'll end up not only with a combination of notes, but a variety of byproduct frequencies. You're bound to find all sorts of interesting things, good luck!
9 Jan 2011 by nomani
can u suggest me how to compare two audio files orhow can i get the time series values of audio filelike the values of samples of audio file(mp3 format)???how can i get them , using c# or any other languagemy email id is knomix@gmail.comwaiting for your kind reply thanks :doh:
9 Jan 2011 by Kasson
Hope This[^] will give an idea.
30 Nov 2016 by Charly LEE
the input mp3 is single channel with 32000 sample rate, 16bit signed.I am using ffmpeg 2.6 to decode mp3 on ios9.3.2 pad. It get white noise only. but it works on windows.I record the decoded PCM to file and use tool to play it. when I changed the bit set to 32. I can hear the original sound...
30 Nov 2016 by KarstenK
the solution looks really simple. AVPacket avpkt; av_init_packet(&avpkt); // set values AFTER init avpkt.data = encode_packet->data; avpkt.size = encode_packet->data_length;I am a bit confused that your old code works on Windows. But I know that the Objective-C runtime...
24 Apr 2013 by nanoturf
I want to build an audio editing and authoring software like Adobe's Auditionwith C# or possibly C++. I don't know what to learn first.1. I would like to learn how the computer understands sound.2. How effects are applied to soundNB: Any books will be greatly appreciated.
11 Apr 2012 by Velkumar Kannan
Hi, I want to play an audio file using C#. How can I achieve it. How to encrypt and decrypt an audio file using C#.
11 Apr 2012 by Sergey Alexandrovich Kryukov
Encryption algorithms do not care about particular content of the data to be encrypted or decrypted. They all work with arrays of bytes, nothing else, so any file can be processed in the same way. The problem is: by encryption, you might mean few very different things. You need to understand...
17 Apr 2014 by Member 10521362
I'm trying to write a program than can take two audio files (e.g. WAV) as inputs, compare them, and spit out a number that tells you how similar the audio files are.If someone has done something like this, know how to go about doing it, or just have some ideas, please let me know. Anything...
17 Apr 2014 by CPallini
I would Google for that[^].
28 Mar 2012 by SMVK
I have a problem because my Speech recognition tool kit need to use sound in 16Khz mono .wav format to work. but my microphone is 44.100 KHz and stereo format. and it's don't have 16khz mono format in microphone setting.I try to use java to convert this wave file. but when i convert sound...
28 Mar 2012 by TorstenH.
Just curious - why does it need to be 16khz/mono ?Sound in Java is very complicated, the Java Sound API is hardly not developed in the last couple of years.I would record in 44Khz and convert it afterwards:http://www.jsresources.org/faq_audio.html#convert_sample_rate[^]these libs...
11 Dec 2018 by SuperMiQi
Hello everyone, I wonder if somabody could point me a good example using the to handle 24 bits per sample data stream ? Apparently WAVEFORMATEXTENSIBLE is needed to get more information about the audio hardware. It seems from what I have read waveInxx methods are limited to 16 bit. ...
10 Dec 2018 by RickZeeland
This library on GitHub supports 24 bits audio recording: GitHub - kmatheussen/jack_capture: A program for recording soundfiles with jack[^] jack_capture [--bitdepth n] [--channels n] [--port port] [filename] [ -b n] [ -c n] [ -p port] "bitdepth" is by default...
11 Dec 2018 by SuperMiQi
Hello Everyone, I have implemented a sample app based on the inputs found on the following github example: Csharp-Data-Visualization/projects/18-09-19_microphone_FFT_revisited at master · swharden/Csharp-Data-Visualization · GitHub[] Thanks again for your feedback.
4 Feb 2013 by Jordi Bouman
I'm working on a new website which makes sending music between music professionals easier. Some receive more than 1000 songs a week and I want to simplify this.In short the website contains out of two sections. One to send music and the second to receive music (some sort of iTunes but then...
28 Dec 2010 by greenn54
hi! i want to record audio from microphone. but i couldnt record audio correctly. my program is below. can anyone say what is my wrong?record is a buffer which is have audio data.void saveRecord(short *record){ FILE *f; int bitsPerSample = 16; int subchunk1size = 16; ...
28 Dec 2010 by tanakahitori
int chunksize = 36+subchunk2size;fwrite((char*) &chunksize, 1, 4, f); int subchunk1size = 16;fwrite((char*) &subchunk1size, 1, 4, f); //sizeof(int) = 2 , you wrote 4 bytes to file, maybe this is problem printf("bufnum : %d", bufnum); //you called printf, seem your program...
28 Dec 2010 by tanakahitori
int sampleRate = 44100;fwrite((char*) &sampleRate, 1, 4, f); int byteRate = sampleRate*numChannels*bitsPerSample/8;fwrite((char*) &byteRate, 1, 4, f); int subchunk2size = bufnum * numChannels;fwrite((char*) &subchunk2size, 1, 4, f);I think problem it is same with answer1 ,...
28 Dec 2010 by greenn54
when i changed them what you suggest it results run time error;void saveRecord(short *record){ FILE *f; int bitsPerSample = 16; int subchunk1size = 16; int numChannels = 1; //int subchunk2size = size *numChannels; int subchunk2size = bufnum * numChannels; ...
28 Dec 2010 by tanakahitori
int bitsPerSample = 16; fwrite((char*) &bitsPerSample, 1, 2, f); //if you think sizeof(int) = 4 bytes //why you still only wrote 2 bytes for "bitsPerSample" and please tell me more where is your problem? you couldnt play the buffer after the recording is ready? or you cann't...
28 Dec 2010 by greenn54
in my project winmm functions are recording audio with buffersize. and i combine them in record array. and i want to save this total audio data in a wav file. my problem is its record but not correct data. its playing differt noises.
14 Oct 2010 by greenn54
hi i want to record audio from mic. if bitwBitsPerSample set to 8, it works perfectly, but when it's set to 16, the record file contain horrible noise, how can i solve this problem? source code;#include #include #include #include #include...
19 Oct 2010 by Be Yourself
Try reducing the WAV_SMP valueWhich is the samples per second ..:cool::cool::cool:
27 Sep 2012 by mayaSage
Hello,Anyone has any idea how I can convert an audio file into binary code? Are there any programs I can use?Thank you,MayaSage
27 Sep 2012 by Sergey Alexandrovich Kryukov
The question makes no sense. Everything is "binary", including your original audio file.[EDIT]After OP's (incomplete) clarification:I can only guess that you need to represent the waveform and do some image recognition, but it all depends on what you have and what you want —...
15 Apr 2013 by mani_bharataraju
I wan to convert my audio into float values using java .Is it possible to do so?
15 Apr 2013 by Naz_Firdouse
Do you want to convert audio format byte array to float array.if so, have a look at thishttp://stackoverflow.com/questions/6235016/convert-wav-audio-format-byte-array-to-floating-point[^]
11 Jun 2013 by cyogeshc
I've an audio file with me. Say, a speech. How do I extract the text from the audio and store it efficiently in a database? If the user queries an audio based on the text stored, making use of certain keywords then I must be able to connect the audios in the database with the keyword and get...
11 Jun 2013 by Mehdi Gholam
An advanced topic, try the...
30 Apr 2013 by Robin Rizvi
Audio-Gallery-Suite is a complete audio gallery solution made with HTML5/CSS3/Jquery-JS/PHP-Ajax/C# that includes a web audio gallery and a software for managing the web audio gallery.
26 Apr 2012 by vis2012
I am at intermediate level in VB.net stuck at doing automized audio converter..... like converting .wav audio to same .wave output(PCM 11.025kHz 16bit mono) for set of files in quicker manner.Can anybody help me?...................
26 Apr 2012 by Bernhard Hiller
NAudio can do alot of conversions, and it comes with source code:http://naudio.codeplex.com/[^]I expect that you can then figure what to do next.
26 Oct 2018 by cassanelligiovanni
Hi, I'm a programming student and in these last years I touched various programming languages : C++, Java, Javascript, Python. For my third year project I was planning to develop a Music Loop Software that acquire up to 8 inputs from an external audio interface and loop them in different...
26 Oct 2018 by MadMyche
There really is no right answer for you on this, as it is primarily opinion based as well as the users comfortability within the various languages. The only thing that you can eliminate from the list is JavaScript which is mostly limited to a browser. There are GIT/NuGet packages for just...
26 Oct 2018 by Rick York
I agree with MadMyche's answer. I would add to that - first find a MIDI library that looks good to you. There are a few of them here. If OS portability is really important to you then you need to find a MIDI library that is also portable. That could prove to be challenging but I don't know...
19 Apr 2014 by Coding Learner
I would like to ask if there are best practices for choosing audio/video formats for websites to get the widest platform and browser support given limited resources especially in development time (for HTML coding, file format conversion, etc.).I have Googled the answer without success (for...
19 Apr 2014 by karthik Udhayakumar
Hello Coder,pls refer thesehttps://developer.mozilla.org/en-US/docs/HTML/Supported_media_formats[^]Hope this helps:)
27 Apr 2011 by Rick Shaub
It looks like a character (UTF) encoding issue. See if the code below works: Byte() bytes = brObject.ReadBytes(4) Format = ASCIIEncoding.ASCII.GetString(bytes) If Format "WAVE" Then IsWaveFile = False Exit Sub End If
27 Apr 2011 by kapamzing
Since you opened a Binary Reader.I think you should use the ReadBytes method.A char is not always 1 bytes, in case of unicode, it is 2 bytes.Reading 4 unicode chars, is the same as reading 8 bytes.If the byte pattern looks like a unicode character,the ReadChars method might read more...
27 Apr 2011 by TheBitSlinger
I'm reading a WAV file with non-standard data in the chunk (basically, the WAV file has, rightly or wrongly, ID tags in the chunk - which is something I want my code to handle so that it can clean up these kinds of files).Sometimes, the following code is working fine when processing a...
3 May 2011 by Be Yourself
Dear All, I am starting to work on audio programming but I am unable to find any useful programing books can anyone help me?
3 May 2011 by Ramalinga Koushik
Hope this[^] might help you.
3 May 2011 by LaxmikantYadav
Check This :http://stackoverflow.com/questions/2149537/recommendations-for-technical-programming-podcasts-or-audio-books[^]
23 Oct 2012 by Judah Gabriel Himango
Exercising Silverlight 4 to build a fun, real-world app
4 Aug 2022 by Vishwas_R
Simple Audio Player to browse any song with Play / Pause, Stop options & a waveform generated using CanvasJS charts
10 Nov 2016 by Member 1898210
Hi all,I'm having issues with achieving something I'm sure you guys can assist.I'm trying to iterate over a Wave file and process 20ms of the audio data each time. However, I'm getting confused with the bytes arrays and conversions and I'd be grateful if someone can assist on this with...
9 Nov 2016 by Richard MacCutchan
You are using Buffer.BlockCopy to copy from data to sampleBuffer, and then from shortBuffer to InpBuf. But you never put any data into shortBuffer. Your code is quite confusing with all those different buffers. All you really need is one in which to read the data. You can then process specific...
10 Nov 2016 by Bernhard Hiller
I think Buffer.BlockCopy copies bytes, not shorts. Since you use 16bit samples, you have to copy twice as much bytes.
12 Nov 2013 by Member 10248324
Hello,When I read the title, It sounded like hacking, but it is completely different.My scenario is "Two PCs have installed the same C# software that I created. With this software, they should see audio and microphone levels of each other and they can change both theirs and others audio...
12 Nov 2013 by Sergey Alexandrovich Kryukov
Apparently, you cannot control anything on the other computer if this computer does not run some process which communicates on the network and obeys your commands.First of all, you need to control audio on a local computer. One of the ready-to-use libraries to do it with .NET is NAudio:...
13 Mar 2013 by velvet7
Hi,I would like to record a specific website's audio output.Now here is how it should look like:I open a website (maybe .NET WebBroswer class?), and I can record that site's audio output, so I can navigate to other site's while it's recording, and then I could play it back.Imagine it...
13 Mar 2013 by Sergey Alexandrovich Kryukov
I hate to tell you that, but in general case this is absolutely impossible. My comment to the question should give you some hint.However, you can cover some special simple cases, maybe for some specific sites. For example, if the pages contain background music or just downloadable audio...
16 Mar 2011 by pkulik
Hi,I'm trying to find some codes examples that will allow me to read mp3 files into a winform app and send three of them to the left channel of the sound card and a fourth mp3 to the right channel.Any help will be greatly appreciated.Thanks
16 Mar 2011 by #realJSOP
This library might help:nAudio on Codeplex[^]
28 Nov 2012 by paul_b
Hey, I'm really stumped on this and it just seems like I'm missing something obvious.I'm trying to implement a feature in a C# windows store app that allows you to speak through the microphone and that sound to come out of the speakers in real-time.Recording sound to a file for later...
1 Aug 2017 by kazz199
i am working on a project in which i need to get the fundamental frequncies of the audio input of microphone. I want to get frequency in every 0.1s while audio is input throught microphone. how to do this using c#.net using libraris such as naudio.? i did some research but implementing this...
1 Aug 2017 by RickZeeland
Maybe you can try to contact Christian Woltering, the author of this CodeProject article: Comparison of FFT implementations for .NET[^]
8 Dec 2018 by CalicoSkies
Mixing audio from multiple WAV files to a single WAV file. Includes a C++ class for reading and writing WAV audio files, derived from an AudioFile class for future support of other audio file formats.
12 Apr 2013 by Gettor9000
I have a C# project that takes multiple (2 at the moment) microphones as an audio devices, detects sound from them, processes their audio frames with Fourier Transform and displays them. It also prints them in three colors: red is for microphone that has stronger input, green is for microphone...
12 Apr 2013 by CPallini
Roughly speaking, I would first normalize the amplitude of the two graphs and then time-translate one of them until best superposition is reached.
26 Mar 2016 by Member 12416797
Hi guys, i'm trying to develop call reorder app for windows 10 using UWP platform. But i stucked on audio capture. Tell me plz using what technology i can figure it out.What I have tried:I read about Naudio, but it semms that it doesn't work well with UWP. Also i tryed to use...
26 Mar 2016 by Sergey Alexandrovich Kryukov
Please see my article Practical Sound Recorder with Sound Activation[^].It is not a UWP but is in WPF, but it doesn't matter, because its audio part is tiny, clearly written in a separate file and class and can be used anywhere where you can use legacy Windows API. Actually, this part of API...
9 Dec 2014 by aj_scorpio
hii i have made a program in Directshow using Visual C++ to convert the microphone audio into MP3 by using LAME ENCODER. Now i would like to access the buffer so that i can use the encoded data for further processes. So my question is can i use the sample grabber to do so. Pls help me i'm new to...
22 Oct 2014 by Member 11094074
In my project I'm reading audiostreams from my web service using NAudio MediaFoundationReader, and it works like a charm over http. However, when the web service is set to use https, mediafoundationreader throws an COMException in NAudio.dll. (Exception from HRESULT: 0x80072EFD)I know I can...
22 Oct 2014 by BillWoodruff
Using Google to search for C#/.Net error messages really does work: look at the top two results for these searches: [^], [^].Very specific issues with specialized, widely-used, 3rd. party .NET tools/libraries are often best asked/answered on the company/open-source-group's Forum, if they...
26 Jun 2014 by Haseito
Is it possible to change audio frequency (pitch) while listening to a music?I searched in google but I was told to convert / change the whole file. I'm planning to create two button (up and down) to change the frequency while listening to a music.Thanks before.
26 Jun 2014 by Kareem Abou Saad
Use this code to read the wave file:// convert two bytes to one double in the range -1 to 1static double bytesToDouble(byte firstByte, byte secondByte) { // convert two bytes to one short (little endian) short s = (secondByte
26 Jun 2014 by Bernhard Hiller
Then you have to handle the playback of audio yourself - that's a lot of work.When you've accomplished that, take a look at the buffers of audio data you send to the audio device: these buffers need to be changed. That means, you do a Fourier transformation to get the frequencies, then shift...
10 Nov 2011 by hrubon2
Hi,I´ve got a problem, I want to programmatically change default audio device in Windows 7. I´ve been already searching severeal APIs documentation on MSDN and so on, but I haven´t managed. Finally I downloaded CoreAudioAPI and tried to set it, but also unsuccessfully, I found how to enumerate...
10 Nov 2011 by Prerak Patel
http://stackoverflow.com/questions/1555156/c-sharp-how-to-programatically-change-the-playback-device[^]
25 Sep 2012 by ljw1004
VB code to convert MP3 to WAV in Windows 8 using MediaFoundation
27 Jan 2015 by jasonjr.hill
I'm working on a SIP softphone but I got the following problem and I have no idea how to solve it:During an audio call, PMCA codec is used primarily. How to setup codec priority to achieve PCMU will be used during the call?I use Windows 7, C# (Visual Studio), Ozaki C# SIP library and the...
22 May 2013 by Gettor9000
Hello.I have a project in which i need to combine two mono mics into one stereo mic so that samples from one of them are treated as the Left Channel of stereo mic and samples from the other are the Right Channel. Unfortunately the only thing i was able to do was combine them with Virtual Audio...