[speex-dev] Removing silence at the start and end of sample encoded

Asger Kunuk Alstrup alstrup at sophusmedical.dk
Sun Jan 11 05:43:07 PST 2004



Hi,

Jean-Marc Valin wrote:
> Actually, there are probably some batch programs that could do the
> job. It's definitely not a job for speexenc, which I'd like to keep
> simple.

Fair enough. Which batch programs should I be looking for? I had a look around,
and could not find any...

The reason speexenc seems like a good place to do this, is that it already have
the routines to detect silence, and I figured it would be relatively easy to
implement based on that.

Failing to find a suitable batch program, we will probably make a local patch
for this - maybe you can help us a bit by giving a few pointers for how to do
this in speexenc?

Thanks,
Asger

> Le ven 09/01/2004 à 17:37, Asger Kunuk Alstrup a écrit :
>> However, we have a small feature requests for speexenc that would
>> make things perfect for us: Support for trimming the start and end
>> of the sound away, during the encoding process.
>>
>> This feature request consists of two things:
>>
>> 1) support for automatic detection and trimming of silence at the
>> start and end of the sound out.
>>
>> 2) support for intentionally skipping the very first and very last
>> parts of the input WAV, even if it is not silence.
>>
>> This is because we record a lot of small sentences using a recording
>> tool on the PC - we are talking hundreds of sentences. Every time
>> the actor records a sound, he has to press space first on the
>> keyboard, wait a bit, read the text, and then click space again to
>> stop recording when he is done reading it. Now, we can often hear
>> the release of the space key at the start of the sample, and the
>> pressing of space bar at the end of the sample.
>>
>> So, our samples all look like this:
>>
>>   "Noise---Silence---Noise-speech-with-wrong-gain---Silence---Noise"
>>
>> We would like to automatically get this after feeding the WAVE file
>> to speexenc:
>>
>>   "Speech-without-noise-and-correct-gain"
>>
>> with the leading noise and silence trimmed out. Speexenc already
>> supports automatic gain control and noise reduction, so all we need
>> is the trimming of the start and end, of both the noise and silence.
>> Of course, the silence part varies in length from sample to sample,
>> but we can cap the noise to X milliseconds.
>>
>> As it is today, we have to manually edit these samples to remove the
>> noise, and then Cooledit can batch-process the silence out for us.
>> After that, we use speexenc to get the final sample, but it should
>> be possible to do this in one operation, making everything simpler.
>>
>> If you can not implement this for us, maybe you could give a few
>> hints to where we should look to implement this feature? We are
>> using the CVS version of Speex.

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Speex-dev mailing list