Sherwood McGowan
2005-Sep-29 05:49 UTC
[Asterisk-Users] Audio Files, Filtering, and Formats for Asterisk
I listened to all the demos you showed. My ear discerns a little muffling and minor "slushiness" in the GSM files you sent, along with a much more narrow bandwidth, mainly on the high end side, and Allison either has a mild whistling s or slushy s sound in her voice or the producer didn't properly compress it to "de-ess" the recording. Or, I could just be rather tired. Either way, your best bet is to have the system use WAV files but also make available GSM and ulaw versions of the same files. This is so that the system can pick (and it does this automatically) the best format that requires the least amount of CPU power for transcoding. If I remember correctly, FXO/FXS cards can use straight PCM files. What I do to prepare a file is this: I record in 48Khz 32 bit mode (32 bit is just higher resolution so processing has more to work with, 16 bit is fine since it's the end result), then I compress with de-essing and pop removal (maximizes volume, removes slushy or whistling s's and popping p's), then run through an FFT (Fast Fourier Transform) to bring the frequency response within the natural range of a telephone (if I remember correctly it's within the 300 - 4K range, I can check if need be). Then I reduce the file to a 8Khz, 16 bit mono file. Then I check the audio again, and normalize (like compression but only raises the whole file to where the highest peak of audio reaches the level requested, instead of raising or lowering the level on a dynamic basis by using readahead of a couple milliseconds). I usually normalize to around -3db. The end result is a WAV file that sounds good over the phone. I then put the file on the asterisk server (or another server with sox installed) and convert to gsm, ulaw, and alaw (using the original WAV, not using converted gsm or whatever). Hope this was helpful, and I wish you luck. If nothing else, for like $50 or so (depending on how many files there are) I would be willing to take a series of WAV files from you and perform the filtering and whatnot for you, and supply gsm, wav, ulaw, and alaw. I'm also going to just try and get a series of recordings together through my partner's studio in Phoenix AZ, make the files available to the community, and take up donations for the studio and processing time. Talk to you soon. I'm going to cc the asterisk-users list for this, so that the community can benefit from the information. SKM ->-----Original Message----- ->From: Stephen Bosch [mailto:posting@vodacomm.ca] ->Sent: Thursday, September 29, 2005 12:18 AM ->To: Sherwood McGowan -> ->Hi, Sherwood: -> ->If you'll forgive me, I'd like to e-mail you directly with a ->few comments and questions. -> ->Sherwood McGowan wrote: ->> I have to barge in here... ->> ->> Guys, the reason the audio sounds like hell is most probably for ->> mulitple reasons. First, what codec is the prompt encoded? ->Next, what ->> codec is the client using? If you're using, for example SIP clients ->> with G711u, asterisk has to re-encode (on the fly I might add) the ->> prompts to ulaw format to be usable to that client. Only on ->GSM based ->> clients would the audio sound mildly like the actual file. Also, ->> what's the current load, memory, how many calls are running on the ->> server, how many calls on hold listening to that music? If ->you're not ->> encoding only one format for those calls, guess what, ->you're incurring load to re-encode to each format in use on the fly. -> ->It's obvious I have much to learn about file formats, but ->bear with me here. -> ->In this particular case, the card is the Digium TDM-400 and ->the phone is an analog phone (an old ITT touch-tone phone -- ->indestructible and superb sound quality). I don't know if ->there's any transcoding happening on-the-fly. -> ->The thing is, though -- the prompts don't sound that great ->when I play them with play on my workstation -- and it's ->using the libgsm library, so there shouldn't be any ->transcoding happening there. -> ->All this time I've just been talking about the prompts ->provided with Asterisk. Asterisk records voicemail (for ->example) in the same GSM format that these prompts are in (if ->the recordings sound as poor as these prompts do, I don't ->know whether I'll even be able to use Asterisk for this application). -> ->While the delivery is professional and I'm sure the original ->sources sound great, these GSM files don't sound so hot. ->They're muffled and there is a slight bit of static. I've ->attached the demo-congrats.gsm file for example. Try it yourself. -> ->> I am a music producer, have been for several years. One of ->the things ->> I do on the side from my day job as a VOIP Admin/Engineer is make ->> prompts and music for customer's PBXs. I typically make a WAV file, ->> and then do my filtering, compressing, and finally ->normalizing, then ->> save it. Finally, I put the files in the server in question and use ->> sox to re-encode multiple ->> formats: gsm, ulaw, alaw, etc.... You'll find the results are much ->> better than just allowing Asterisk to re-encode on the fly ->since it's ->> busy handling the rest of the system as well. Another way ->to help it ->> is to only allow one codec. -> ->I'm hoping that, as a music producer, you'll have a ->sufficiently keen ear to hear the same noise and muffle that I hear. -> ->Have you ever made prompts for non-VOIP systems? Is the ->process the same? Can you send me a sample prompt in various ->formats so that I can get an idea what a good prompt *should* ->sound like? -> ->(This wouldn't matter to me if it weren't for the fact that ->I've heard other PBX prompts (mostly for standard, digital ->telephone systems) and the Nortel and Octel stuff just sounds ->better, and people notice it. I'm in Calgary, and this is ->hardcore Nortel country. If you want to compete with that, ->you have to be as good or better.) -> ->I sure appreciate your feedback and assistance in this, Sherwood. -> ->Thanks, -> ->Stephen Bosch ->Calgary, Alberta, Canada ->
Stephen Bosch
2005-Sep-29 08:04 UTC
[Asterisk-Users] Re: Audio Files, Filtering, and Formats for Asterisk
Sherwood McGowan wrote:> I listened to all the demos you showed. > > My ear discerns a little muffling and minor "slushiness" in the GSM files > you sent, along with a much more narrow bandwidth, mainly on the high end > side, and Allison either has a mild whistling s or slushy s sound in her > voice or the producer didn't properly compress it to "de-ess" the recording. > Or, I could just be rather tired.I don't think so. Everybody else I've played them for has made similar observations.> Either way, your best bet is to have the system use WAV files but also make > available GSM and ulaw versions of the same files. This is so that the > system can pick (and it does this automatically) the best format that > requires the least amount of CPU power for transcoding. If I remember > correctly, FXO/FXS cards can use straight PCM files. > > What I do to prepare a file is this: > > I record in 48Khz 32 bit mode (32 bit is just higher resolution so > processing has more to work with, 16 bit is fine since it's the end result), > then I compress with de-essing and pop removal (maximizes volume, removes > slushy or whistling s's and popping p's), then run through an FFT (Fast > Fourier Transform) to bring the frequency response within the natural range > of a telephone (if I remember correctly it's within the 300 - 4K range, I > can check if need be).How do you "de-ess" and remove pops? What filters do you use?> Then I reduce the file to a 8Khz, 16 bit mono file. Then I check the audio > again, and normalize (like compression but only raises the whole file to > where the highest peak of audio reaches the level requested, instead of > raising or lowering the level on a dynamic basis by using readahead of a > couple milliseconds). I usually normalize to around -3db. > > The end result is a WAV file that sounds good over the phone. I then put the > file on the asterisk server (or another server with sox installed) and > convert to gsm, ulaw, and alaw (using the original WAV, not using converted > gsm or whatever). > > Hope this was helpful, and I wish you luck. If nothing else, for like $50 or > so (depending on how many files there are) I would be willing to take a > series of WAV files from you and perform the filtering and whatnot for you, > and supply gsm, wav, ulaw, and alaw. > > I'm also going to just try and get a series of recordings together through > my partner's studio in Phoenix AZ, make the files available to the > community, and take up donations for the studio and processing time. > > Talk to you soon. I'm going to cc the asterisk-users list for this, so that > the community can benefit from the information.Thank you, Sherwood - you've been extremely helpful! I am going to try those steps you suggested (once I learn how to 'de-ess' and remove pops) but I may just take you up on the filtering and processing offer. -Stephen-