Converting Audio Files to Text in C# or Java - c#

I need to convert audio files, being specific mp3 files to simple Text, and then converting back that text to mp3 again, one of feature of my mobile application, is it possible? if Yes, then how? guideline please.

You can find the answer for audio to text here (second post)
For the text to audio, i would use any Text-to-Speech. In c# you could also use System.Speech.

Related

Convert MP3 to MIDI in C#

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/

Search an Audio inside another Audio in C# or C++

Suppose there is a sample audio file that contains up to 10 simple words
"One Two Three .... Ten"
and there is 1 second silence between each number in the audio file.
I want to check to see if the audio file contains keyword "Two" for example.
Please note that I have the keyword "Two" voice file and it's the same exact voice from the master voice file, but It may contain some noise.
Is there a way for me to search the voice "Two" inside that bigger audio file and find the occurrence time?
Since there's no provided code, i'll just give you the idea how to proceed, hope it'll help.
First you have to split your file to 10 different audio files according to silence (I'm sure there are libraries that will help you do that).
Then you can send the file to google voice recognition api, and get a string as a result, which will contain the string according to the voice in the file.
EDIT: Please refer to:
https://googlespeechtotext.codeplex.com/
How to use google speech recognition api in c#?
Why don't you just work out to convert both the audio samples into some bits or signal formats and check if they both have a some common strings.
Some of the links you should check before going any further just to work out with audio in .Net:
http://crsouza.com/2009/08/converting-audio-bit-depths-in-c/
https://cscore.codeplex.com/
http://www.codeproject.com/Articles/501521/How-to-convert-between-most-audio-formats-in-NET
Let me know if you can work this out.

convert Audio file to text file c# library or source code

I just want to know if there is any built in libraries or external libraries in Java or C# that allow me to take an audio file and parse it and extract the text from it.
You can use the built in .NET speech recognition APIs to accomplish this. MSDN has a set of complete samples that read an audio file and then write the recognised speech to the console. With a little bit of work they can be modified to output to a plain text file:
http://msdn.microsoft.com/en-us/library/system.speech.recognition.speechrecognitionengine.setinputtoaudiostream.aspx

Extracting and splitting a MP3 audio stream from an AVI file

I want to develop a desktop application by programming in C# and using the .Net framework 4.
The goal of my application is to extract a MP3 audio stream from a supplied AVI file.
I have learned from the Internet that an AVI file is a container and it might contain different audio streams.
If the supplied AVI file contains one MP3 audio stream at least then I want to extract it and split it.
I want to split the MP3 audio stream into MP3 audio parts identified with a start time and an end time.
I have looked on the Internet for any .Net library I could use but without success.
Does someone know what documented .Net library would be useful ?
Maybe you can try this:
Simple C# Wrapper for the AviFile Library
It is targeted at AVI video but there might be some clues as how to use the same methods to extract the audio only.
Either use it as-is or use the example to incorporate what you need into your own code.
Since tools for this task already exist, I see no point in creating another one unless you're curious about how to do this yourself and learn something new.
If so, using a ready-made library would defeat the entire idea of learning something which is why I strongly recommend you try implementing the splitter yourself.
You can find descriptions of the AVI file format online, that should get you started.

calculate playing time of a .mp3 file

I'm doing a sample which will run mp3 files which are selected by the user. I
want to calculate the playing time of the file (e.g. 00:05:32). How can I calculate the playing time?
You could use TagLib Sharp
It exposes TagLib.AudioProperties.Duration
For Alvas.Audio library see code below
using (Mp3Reader mr = new Mp3Reader(File.OpenRead("len.mp3")))
{
int durationMS = mr.GetDurationInMS();
TimeSpan durationTS = TimeSpan.FromMilliseconds(durationMS);
}
You suggest in the tag that you're doing this in C#. This question deals with it:
Finding MP3 length in C#
And there's some code for reading the MP3 header and extracting relevant information (like the length) here:
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=79
I believe the Windows Media API (or windows mixer api or something, I can't recall the exact name) has a way to open and read sound files like mp3 and maybe get the time from it too. As an added bonus, by using that API you can open any audio format that will work in say Windows Media Player, so you're not limited to just mp3's.

Categories

Resources