I have a Wav file that I'm creating via the Microsoft Kinect that I'm saving to the desktop. I need to convert it to FLAC format so I can send it up to the Google Cloud to be processed from Speech2Text.
I haven't found any WAV to FLAC encoders in C#.
Is there any way to convert a WAV file to a FLAC file in C#?
Try to use LibFlac (sourceforge). The FLAC encoder is an open-source C/C++ project. In order to use it in a C# application you have to use PInvoke to call its application programming interface LibFlac.dll. Checkout this blog post, that explore the processing of uncompressed audio data with the FLAC API in C#:
Encoding uncompressed audio with FLAC in C#
Related
We have a blob storage that we are putting MP4 files into. We want to create a function that watches for the incoming files (like a pub/sub), and then using azure media-services encode the file to a wav, and save the transformed artifact to another blob storage container. I can create the job to watch for the files that come in, the problem we are having is finding out how to create a wav file using the media-services transforms. We are trying to avoid having to copy the MP4 files to another location to encode them to wav files, then deleting the MP4 file and the wav file once we are done. These files can run into the gig size quite a bit.
We use the wav files to transcribe them into text (our transcription software requires the files in wav format). We looked at the azure speech services to do the transcriptions, but it is cost prohibitive, and the transcription software we currently use is specialized for our line of work and more efficient at transcriptions.
I guess the first question is "Is it possible to transform an MP4 to wav using azure media-services?" If so, does someone have an example on how this is done?
Thanks.
Here is a sample of an Azure function that can encode a Azure blob and output to a blob blob. https://github.com/Azure-Samples/media-services-v3-dotnet-core-functions-integration/tree/master/Encoding
Short answer: no, you can't create a Transform in our service today that will enable you to decode an MP4 input file into a WAV output file.
Where are you running your transcription software? Have you considered running open source SW like ffmpeg on those compute instances to convert MP4 to WAV?
Thanks
I'm working on a program (C#) to convert an MP3 file to MIDI, but I have a problem with converting it. How should I do?
Is there any library to generate MIDI from MP3 file
Thank You
It seems that it is not a converter. It seems that you need some complicated process to generate a MIDI from an MP3 file. There are some useful discussions in the following links:
https://www.codeproject.com/Questions/992205/How-do-I-convert-an-mp-wav-file-to-midi-in-vb-net
https://www.gamedev.net/forums/topic/505842-writing-a-module-to-convert-mp3-to-midi-files/
I have been working on a VoIP Application in C sharp language. The purpose of the project is VoIP Call Recording. It uses g729 Codec. I can extract the voice part from RTP payload. How to convert this Byte array to .wav format? Please help me.
You can try to use ffmpeg.exe and work with it via command line
I need to convert an AMR (Adaptive Multi-Rate) audio file recorded in a phone (as a Stream object) to a PCM uncompressed wav audio Stream so it can be processed afterwards for speech recognition. The Speech Recognition doesn't like the AMR format. This is going to be a server application using the Microsoft Speech Platform. I am not sure about using the ffdshow or similar libraries in a .
Right now I am researching NAudio and DirectShowNet to see if they can help me accomplish this but was hoping someone can point in the right direction.
After a lot of searching for a solution for this, I am going to use ffmpeg. It provides the AMR-NB (NB=Narrow Band) decoder. There are a lot of c# wrappers for ffmpeg around; most of them abandoned efforts and one that is up to date but is not free. Just running ffmpeg with the basic parameters provides what I need, plus it is really fast.
I don't like the idea of calling an external process to do the conversion, plus I need to save the AMR stream as a file so it can be converted to a wav file but I believe I can make it work efficiently.
I am developing an application in which I need to extract the audio from a video. The audio needs to be extracted in .wav format but I do not have a problem with the video format. Any format will do, as long as I can extract the audio in a wav file.
Currently I am using Windows Media Player COM control in a windows form to play the videos, but any other embedded player will do as well.
Any suggestions on how to do this?
Thanks
If you want to do this with C#, take a look at NAudio library. It can analyze the audio format (like FFMpeg) and also provide the audio stream. Here's one example.
Snippet from the sample:
using NAudio.Wave;
using System.IO;
...
// contentAsByteArray consists of video bytes
MemoryStream contentAsMemoryStream = new MemoryStream(contentAsByteArray);
using (WaveStream pcmStream =
WaveFormatConversionStream.CreatePcmStream(
new StreamMediaFoundationReader(contentAsMemoryStream)))
{
WaveStream blockAlignReductionStream = new BlockAlignReductionStream(pcmStream);
// Do something with the wave stream
}
Here is a link on how to extract audio using GraphEdit, GraphEdit is an front end UI for the DirectShow API so everything it can do you can do with API.
You can use the DirectShow.NET liberty which wraps the DirectShow API for the managed world.
Probably easiest to use ffmpeg for this kinda thing...
Very easy with FFMPEG! I routinely do this to grab audio out of downloaded youtube videos, convert music downlaods to WAV for editing, etc etc. It should work for any file extension:
ffmpeg -i source-of-any-file-extension.avi -vn -ar 44100 -ac 2 -ab 768000 -f wav target-filename.wav