Hi altogehter,
I´m using a tts-script (text-to-speech) I wrote quite a while ago. The only thing that bugs me is the muffled audio.
I don´t want to power up a graphical equalizer just for that (although I´ve installed pulseeffects).
As I use “mplayer” for playback within my script I found a phantastic option. Mplayer supports an equalizer option natively.
The command
mplayer -af equalizer=0:0:0:0:0:0:0:0:10:10 sound-file.wav
works just fine. It produces much crisper audio. Splendid for tts.
But: Some wav-files have a sample-rate that is too low for that process. Terminal says:
[equalizer] Limiting the number of filters to 8 due to low sample rate.
So the equalizer option has no effect.
On MPlayer - The Movie Player I found an interesting comment:
Sample Rate Conversion:
If the audio sample rate in the original file is not the same as required by the target format, sample rate conversion is required. This is achieved using the -srate option and the -af lavcresample audio filter together.
This is the example they give:
DVD:
-srate 48000 -af lavcresample=48000
Now I´m not dealing with a DVD here but a mere audio-file. So I tried two different commands:
mplayer -srate 44100 -af equalizer=0:0:0:0:0:0:0:0:10:10 sound-file.wav
and
mplayer -srate 44100 -af lavcresample=44100 -af equalizer=0:0:0:0:0:0:0:0:10:10 sound-file.wav
Both work equally well and produce an exit code of “0”. And both have the desired effect of making the equalizer kick in.
So my question is:
What do you think, which syntax is the correct one and which should I use
Thanks so much in advance.
Many greetings.
Rosika