.wac to .wav conversion - audio

I've been asked to sample some data in a .wac file type. I'm not familiar with this standard and there is very little on the internet with regards to this format. I got given the .wav file but I don't think it was converted correctly, in that there was a none existent of the RIFF header so no .wav reader was able to read it.
Could anyone therefore shed some light into how I could possibly convert the .wac file into a .wav file? Doing some research, I cannot seem to find a converter tool on the internet, and, MatLab does not have a module for reading in .wac data.
NOTE: I've put the tag "game-engine" because according to this website: Here it is used in the infinity game engine.

I've come up with the following solution, however, massive thanks to #jpaari for his input.
Basically, I used sox:
sox -r 44100 -e unsigned -b 8 -c 1 input.raw output.wav
I was able to re-name the file to .raw and this worked. I'm going to update the Sample Rate to what #Aybe posted.

Try this http://www.shsforums.net/topic/39117-ps-gui-v304/
I think Audacity can do it aswell. Also the "unity3d" tag is not quite right.

Related

Exporting a Opus stream to a wav file in Rust

I've gotten a Opus stream (specifically one from Discord voice servers), and I'm trying to convert it to a .wav file that can be used for DeepSpeech. I've already done some internet digging, and found opusdec, which almost perfectly fits my use case. I exported some test files to test upon, but when I tried to use them with opusdec, I got a error:
$ opusdec 293434418808314550478788892773147202909.opus
Decoding complete.
This doesn't look like a Opus file
(the file used above can be downloaded here)
I know these files have no Ogg container in them, so what I'm mainly looking for is a nice way to create a .opus file with a Ogg container in Rust. All the libraries I have found so far seem to be poorly documented, and given how long compiling a test program on my laptop takes, I'm reluctant to do the fiddling around required to use them.
So far, to convert the files to .wav, I've tried using ffmpeg with multiple types of formats passed in (-f s16be, -f libopus) but they either threw a error or resulted in valid wav files, but with static as their contents.
I'm open to a completely different way of doing this, if any are suggested.
Thanks in advance!

How to create simple mp3 file?

How to create simple mp3 file? It can be just one tone 440hz playing for one minute for example. I know that there is the specification of mp3 but it's not so obvious and it is easy to do some mistake and receive incorrect format. May be someone already have any example of source code that create such simple mp3 file? Thank you :)

HE-AAC Conversion

guys!
I've been asked at work to prepare a large audio library for tests, which includes different files of HE-AACv1 & HE-AACv2. To be specific, all sample rates from 8000 up to 48000 and bit rates from 8 bit to 32 bit. But I've been digging the internet for a while and can't find the exact information. Is it even possible to make HE-AAC with 8KHz sample rate? And are there any tools that allow to directly set this specific values (bit rate and sample rate)? I've tried adobe audition, audacity and a bunch of something I found on google, but neither gives me opportunities that I need, or it's just me being dumb.
Please, if you know the way to create a HE-AACv1 and v2 from for example mp3 or wav, tell me how to do it, I would be very grateful.
Thx!
Adobe Audition can definitely create all WAVs that you need, look under "Edit->Convert sample type". You should first create your wav files, and then use some encoder to transcode to AAC.

Converting From 4-bit RAW Audio to WAV (or another output format)

Okay, so I've got some .raw files from an old game (Zork Nemesis) and determined that they're audio files, however I'm having trouble converting them into something meaningful.
With a bit of trial and error in Audacity I've found that I can listen to a still noisy version of the audio using raw file input settings of 8-bit signed PCM in stereo with a sample rate of 22050hz. However, my suspicion is that the files may in fact be encoded in 4-bits with a sample rate of 44100hz, but I'm having trouble finding a tool that can handle this.
What I'm looking for is either a tool that can handle 4-bit raw formats, or even a tool that can determine (or guess at) the format of a given .raw file, so I know for sure what I'm dealing with (as I'm just going by trial and error so far).
I've tried sox, but I'm most likely doing something wrong as it complains of an unsupported size:
sox -r 44100 -e signed -b 4 -c 2 in.raw out.wav
I was also going to try ffmpeg, but I can't find the appropriate format/codec to set.
In case it gives any further clues; I've tried various combinations of settings, increasing sample size while decreasing sample rate increases the (white-)noise, and even 8-bit is still noisy, which is why I'm thinking 4-bit. I've tried signed and unsigned, which strangely doesn't seem to make much of a difference
sox expects .raw input with 8-bit or higher encoding. So if you run
sox -r 44100 -e signed -b 8 -c 2 in.raw out.wav
it should work just fine. So either the file is actually 8(+)-bit encoded or you need find a converter which accepts this form of input.

What is the algorithm to convert an mp3 file to a wav file?

What is the algorithm to convert an mp3 file to a wav file?
It's non-trivial to say the least. You could get an overview of the algorithm here:
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.26.5956&rep=rep1&type=pdf
But I would suggest using a library for your programming needs, for example:
http://www.ffmpeg.org/
As for the mp3 file, I can offer you mpg123 .net wrapper that is extremely easy to use - you will get the sample for reading the mp3, extracting PCM information from it (this is main part of WAV file - PCM data for the sound).
Please, go here:
http://sourceforge.net/projects/mpg123net/
and download sample code from here:
http://sourceforge.net/projects/mpg123net/files/
Ping me if you need more info/help on the subject.
As aac files are concerned, there is faad project here:
http://www.audiocoding.com/faad2.html
that enables you to do the same with the aac file. If you need .net wrapper, I'm about to put it on sourceforge also.

Resources