1

I'm trying to generate a high quality .wav voice-over using Microsoft Speech API. What should be the values of following parameters (they are part of this constructor):

int samplesPerSecond,
int bitsPerSample,
int channelCount,
int averageBytesPerSecond,
int blockAlign,

to guarantee high quality audio?

The .wav file will be used latter to feed FFmpeg, so audio will be re-encoded latter to a more compact form. My main goal is keep the voice as clear as I can, but I really don't know which values guarantee the best quality perceived by humans without waste resource for nothing.

1 Answer 1

1

A standard for WAV is 48K / 16 bit mono, or stereo if there's ambiance or presence you'd like to preserve. The last two parameters are a consequence of those choices and you can calculate them based on your selection. Then any compression you might apply afterward will have a good starting basis.

If all you're after is intelligibility, a lower sample rate may be just as good. 22K / 16 bit mono is good enough for many voice purposes. I personally wouldn't use a lower bit depth, but you can experiment with 8 bit to see if it's acceptable.

2
  • Thanks a lot for your reply! I'm after high quality, mean not just intelligibility. I have seen people that select 88200 instead of 44000 (here and here). Do you know if is human perfectible the different between those two sampling values after apply a standard compression to the .wav file? How can I calculate those last two values you said are calculable from the first three?
    – user4101
    Sep 25, 2014 at 16:04
  • 1
    You mean 44100, I think, which is adequate. There's no evidence that rates higher than required by the Nyquist limitation have any beneficial effect on the result, and if there were, it would be undone when using a lossy compression algo like MP3. The block align is the product of channels and bytes, so for 16 bit mono it would be 2, or 4 for 16 bit stereo. Average bytes per second is a hint to players and is a function of bit rate, sample depth and channels. For mono, 48000 samples x 16 bits per sample divided by 8 bits per byte gives 96000. 44100x16/8 = 88200 etc.
    – Jim Mack
    Sep 25, 2014 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.