Re: speex support?

View: New views
8 Messages — Rating Filter:   Alert me  

Re: speex support?

by Sanjeev Sharma-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

sorry for the late reply

I'm using speex to record & distribute seminar audio.

It lets you get really high quality voice recording at very low file
size.  (I've never heard file based AMR, but suspect the quality is
not the best)

It also sounds to me like it really cleans up noisy audio - I assume
it drops out sounds that the human voice cannot make, so sounds of
trains and buses and construction crews outside the venue get cleaned
up.  The audio sounds much cleaner, I'm just guessing at reasons why
this would be the case.

Having sox be able to process this stuff would be great.  The tempo
effect, for example, would be a useful thing that few other programs
provide.

BY THE WAY - speex is in ffmpeg, and the ffplay program (I think it's
part of ffmpeg) plays speex files, but when I try this

sox  -t ffmpeg *spx -t pulseaudio


I get this:

sox WARN mp3-duration: recoverable MAD error
sox WARN mp3-duration: MAD lost sync



--- On Sun, 19/10/08, D. S. <news.observer@...> wrote:
> I was wondering, are there plans to support the speex
> format?
>
> Speex seems to be nice when you want to squeeze speech down
> to a small
> size. Speex looks likes it can be 5 or 10 x smaller than
> the lowest
> bit rate mp3 formats.

No plan as yet since interest in this format for SoX has been fairly
low so far.  Just playing devil's advocate, of course, adding
+speex to SoX would be cool, but would it actually be useful?
Interested to know what others think on this.

FYI, SoX already supports AMR voice codecs (though you have to build
SoX yourself to get these) which support rates down to 4.75k
+bps.

Anyway, to the whole list, let us know if you have a need for speex in SoX.

Cheers,
Rob


_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: speex support?

by Doug Cook-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm using speex to record & distribute seminar audio.

It lets you get really high quality voice recording at very low file
size.  (I've never heard file based AMR, but suspect the quality is
not the best)
 
I haven't done any quality comparisons with AMR, but it seems to work ok. Main problem is that it AMR still covered by patents.
 
It also sounds to me like it really cleans up noisy audio - I assume
it drops out sounds that the human voice cannot make, so sounds of
trains and buses and construction crews outside the venue get cleaned
up.  The audio sounds much cleaner, I'm just guessing at reasons why
this would be the case.
The speex codec package includes several optional preprocessing steps to clean up audio. Some of these might be useful on their own, perhaps even worth exposing as effects in SoX. These include noise reduction, automatic gain control, and voice activity detection.
 
Having sox be able to process this stuff would be great.  The tempo
effect, for example, would be a useful thing that few other programs
provide.
You can combine the speex and sox tools to make them work together. For example, this will play a mono wideband speex file through SoX:
 
speexdec a.spx - | sox -t s16 --rate 16000 -c 1 - -d (effects ...)
 
The speexdec parameters say that the output from the file should be sent to sox via stdout. The parameters to sox specify input of type s16 at 16000 Hz and one channel from stdin. (Note that you'll need different parameters to sox for different speex files, as they might be encoded at 8000 or 32000 Hz or with 2 channels.)
 
You could similarly encode a file from sox to speexenc:
 
sox (input file spec) -t s16 --rate 16000 -c 1 - (effects ... ) | speexenc --rate 16000 - a.spx
 
It probably wouldn't be a lot of work to add speex to SoX, but it would take some time. One of the main issues is how to set all of the speex options when encoding the file since SoX doesn't currently have a good way to control more than one encoder setting, and speex has 4 or 5 important encoder settings that people might need to set.

BY THE WAY - speex is in ffmpeg, and the ffplay program (I think it's
part of ffmpeg) plays speex files, but when I try this

sox  -t ffmpeg *spx -t pulseaudio


I get this:

sox WARN mp3-duration: recoverable MAD error
sox WARN mp3-duration: MAD lost sync
I'm not sure exactly what happened here, but what happens when you use it with just one file named instead of using *?
 
You can also play speex files through ffmpeg like this:
 
ffmpeg -i myfile.spx -f sox - | sox -p -d (effects ...)

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: speex support?

by Chris Bagwell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10/06/2009 04:10 AM, Doug Cook wrote:
>
> You can also play speex files through ffmpeg like this:
> ffmpeg -i myfile.spx -f sox - | sox -p -d (effects ...)

You gotta a custom version of ffmpeg or did they sneak in support for
our "sox" format when I wasn't looking. :-)

Chris

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: speex support?

by Doug Cook-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> You can also play speex files through ffmpeg like this:
> ffmpeg -i myfile.spx -f sox - | sox -p -d (effects ...)

You gotta a custom version of ffmpeg or did they sneak in support for
our "sox" format when I wasn't looking. :-)
 
SoX format is supported as of sometime around July. The last "release" (0.5) was in March, so it wouldn't be in the release, but it is in any recent snapshot.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: speex support?

by Sanjeev Sharma-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've been doing a lot of this with mplayer, piped to sox.

I would like to get pipe output working in ffplay or vlc (maybe I'll
try again, last time I tried about a year ago it was not working in
either) because speex files are seekable in those 2 players, not in
mplayer.

Thanks for the example commands.  I will try them out

On Tue, Oct 6, 2009 at 5:10 AM, Doug Cook
<idigdoug@...> wrote:
>> up.  The audio sounds much cleaner, I'm just guessing at reasons why
>> this would be the case.
>
> The speex codec package includes several optional preprocessing steps to
> clean up audio. Some of these might be useful on their own, perhaps even
> worth exposing as effects in SoX. These include noise reduction, automatic
> gain control, and voice activity detection.
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: speex support?

by T o n g :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 05 Oct 2009 13:01:22 -0400, Sanjeev Sharma wrote:

> I'm using speex to record & distribute seminar audio.
>
> It lets you get really high quality voice recording at very low file
> size.

Yes, I like/use speex as well. I record to wav format then cleans up the
sounds then convert to speex format. A few questions:

Do you directly record to speex format? If so, how? If not, what
parameter do you recommend for speexenc?

Have you made any comparison with the mp3 format?

Thanks a lot.

--
Tong (remove underscore(s) to reply)
  http://xpt.sourceforge.net/techdocs/
  http://xpt.sourceforge.net/tools/


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: speex support?

by Sam-187 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I record as wav

comparing to mp3 - to get the same file size as speex, you have to go very low bitrate mp3.

between high quality speex and 32kbit/s  or 64kbit/s mp3, there's really no comparison.

these are the speex settings I use if I have good wav recordings.
speexenc -u --quality 10 --comp 10 --vbr --nframes 10  --stereo $i ../../speex/$z/$i

I have to adjust these down sometimes  when I get low bitrate recordings.  When I get 8 khz mono recordings I have to remove the -u and the --stereo for example.  


On Wed, Oct 07, 2009 at 03:32:56PM +0000, T o n g wrote:
>
> Do you directly record to speex format? If so, how? If not, what
> parameter do you recommend for speexenc?
>
> Have you made any comparison with the mp3 format?

--
Regards,
Sanjeev (Sam) Sharma

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users

Re: speex support?

by robs-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

--- On Tue, 6/10/09, Doug Cook <idigdoug@...> wrote:
> > You can also play speex files through
> ffmpeg like this:
> > ffmpeg -i myfile.spx -f sox - | sox -p -d (effects
> ...)
>
> SoX format is supported as of sometime around July.
> The last "release" (0.5) was in March, so it
> wouldn't be in the release, but it is in any recent
> snapshot.

Oh wow -- cool!


     

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Sox-users mailing list
Sox-users@...
https://lists.sourceforge.net/lists/listinfo/sox-users