Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET: How can I convert an mp3 or a wav file to .flac

Tags:

c#

.net

mp3

flac

I need to write a utility in c# that uses Google Speech Api to convert speech from an audio file into text. As far as I know, Google only accepts .flac format for this api. Unfortunately, I have .wav and .mp3 audio files. So I am trying to find out if there is a way for me to convert mp3 to flac in .NET. I looked at NAudio, but it doesn't seem to be working with flac files.

like image 875
Kishore Masand Avatar asked Jul 14 '13 03:07

Kishore Masand


People also ask

Can I convert WAV files to FLAC?

How to convert a WAV to a FLAC file? Choose the WAV file that you want to convert. Select FLAC as the the format you want to convert your WAV file to. Click "Convert" to convert your WAV file.

Can you convert MP3 back to FLAC?

Convertio is an audio format that allows you to convert MP3 to output formats like FLAC, OGG, AAC, WMA, WAV, CAF, AC3, GSM, AIFF, M4A, and AMR.

Can you convert WAV to FLAC without losing quality?

VLC, Audacity, and Online Audio Converter are the best free WAV to FLAC converters. With them, you can finish the WAV to FLAC conversion without losing quality!


1 Answers

I ended up using Gregory S. Chudov's C# implementation of FLAKE encoder. You can find more information at http://www.hydrogenaudio.org/forums/index.php?showtopic=74242

There is another project on BitBucket that uses CUETools FLAKE in its Google Speech Api wrapper. It is a good starting point for implementing speech to text using Google speech api. You can find it at https://bitbucket.org/josephcooney/cloudspeech

I was able to convert wav to flac without much difficulty using the FLAKE encoder. Hope this helps you.

like image 168
Kishore Masand Avatar answered Oct 14 '22 05:10

Kishore Masand