[Speex-dev] How to get podcasters to adopt Speex?

Bertie Coopersmith bertie at coopersmith.demon.co.uk
Tue Oct 3 09:43:01 PDT 2006


If its just speech that you're after, why not narrowband (8kHZ) speex. I have 
found that to be perfectly adequate at about a seven'th of the file size of a 
typical (music quality) MP3. 

The other good thing is that neither server nor client needs to bother with
streaming software or streaming protocol - http will do. I need this because my
web host does not allow user-supplied server software on its free web pages.
I just upload my .spx files (mono,8-bit samples, 8000 samples/sec, 8KHz). which may
have originated from various sources: Live recording, radio, TV, or Web. 

My listening audience consists of family and friends, small in number but spread
over 4 continents. At the crudest level they can do a binary download and convert
to .wav with speexdec (speexdec.exe in the case of Windows). However, they can also
play direct to a unix/linux client by means of
curl url | speexdec -
where the url string is http...spx . In the case of Windows XP this becomes
curl.exe url | speexdec.exe - 

I've elaborated this into a .cmd script which obviates
the need to enter a long url plus filename and also, it
displays a companion .txt file while playing the .spx:-

@echo off
rem   Play a speex (.spx) file on 
rem   Bertie's website. If there is a companion .txt
rem   file, display it while playing the .spx.

cd c:\...\wbin
rem  In this directory you keep, amongst other things,  
rem   the win32 executables known as Unix utilities.
rem   In particular this script depends on curl.exe,
rem   speexdec.exe, sed.exe, fgrep.exe, cat.exe,
rem   echo.exe, tr.exe and nl.exe.

rem  delete scratch files left over from a previous run:- 
del /q spxt* sndt*  txtt*

set url=http://www.coopersmith.demon.co.uk
echo Speex audio files on %url%:
echo -----------------------------

rem remove the html tags
curl -s %url% | sed -e "s+</A>++" -e "s/^.*>//" > spxt2

fgrep -c .spx spxt2 > nul || goto nospx
echo ---------- Speex files -------------------
fgrep .spx spxt2 | nl
echo ------------------------------------------
set /p num=Enter the number of the one to play and press SEND:
echo.
fgrep .spx spxt2 | sed -n %num%p > spxt3
echo.exe  -n "curl -f %url%/" > sndtout1
cat sndtout1 spxt3 >sndtout.cmd
sed  -e s/-f/-fs/ -e s/\.spx/.txt/  sndtout.cmd > txttout.cmd

txttout | more
pause
sndtout | speexdec -
exit
:nospx
echo No .spx files found on %url%
pause

This works well on both dial-up and broadband. 

However, its not gui. I have found that with Foobar2000 on
Windows XP one can open a url to one of the .spx files on my
website and play it. One can even pause and play from a
different position in the file. This cannot be done with the
curl command file.
I tried doing the same with illiminable's Ogg DirectShow filter
but without success.   

Bertie Coopersmith


More information about the Speex-dev mailing list