Help - Search - Members - Calendar
Full Version: Encoding time for Speex
Hydrogenaudio Forums > Lossy Audio Compression > Speech Codecs
tech_noobie
Hi everyone,

Just wondering if there is a way to find out the exact (or close approximation) encoding time of the Speex program? Suggestions are greatly appreciated tongue.gif . Thank you very much everyone.

By the way I have asked similar question in the R&D area but I do not intend to do any spamming it's just because at first I have 2 questions at hand and one was regarding MP3 and hence I do not think it would be appropriate to post it here straightaway (should have thought of splitting it and post them in their respective forums ... sorry).

tech_noobie
Synthetic Soul
I'm not familiar with Speex, but if you are talking about a command line Speex encoder like speexenc at Rarewares then I would use a batch file, and just do:

CODE
@ECHO OFF

ECHO %TIME%

SPEEXENC.EXE myfile.wav myfile.spx

ECHO %TIME%

PAUSE

This will write out the current time, do the encode, and then write out the current time. By subtracting time 1 from time 2 you can work out the time taken to the nearest centisecond.

Any use?
Synthetic Soul
That's useful. Simple and effective.

NB: the first run I did was 3 seconds slower than the subsequent three, which were all around the same time.

I guess this is a memory thing and worth bearing in mind when you do your tests. Run a number of times, discard the first run, and then take the average.

Edit: NB: to pass a parameter with spaces escape the quotes, e.g.:

CODE
TIMETHIS.EXE SPEEXENC.EXE \"death cab for cutie - plans.wav\" plans.spx
tech_noobie
Thank you very much guys for your reply smile.gif. I will try it ASAP. Sorry for replying so late my internet connection was down yesterday smile.gif. By the way is it possible to create a simple script that would allow me to automatically store the encoding time of my various samples in a text file. Thanks for your help. biggrin.gif

tech_noobie
Synthetic Soul
TIMETHIS.EXE SPEEXENC.EXE \"death cab for cutie - plans.wav\" plans.spx > file.txt

... should do it. This will spit the output of timethis.exe to file.txt instead of the console.

Edit: Using the batch file method it would be:

CODE
@ECHO OFF

ECHO %TIME% > file.txt

SPEEXENC.EXE myfile.wav myfile.spx >> file.txt

ECHO %TIME% >> file.txt

tech_noobie
Hi Synthetic Soul and rjamorim,


Thank you very much for your help biggrin.gif. It works ... it works ... tongue.gif. I batch them using matlab, it went very well last night. Thank you guys, I really appreciate your help. laugh.gif


tech_noobie
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.