Fred Welland | 1 Apr 06:28 2005
Picon
Picon

capture/record everything that goes to sound card (alsa) with SOX ???

environment:
---
Dell Latitude D600 running FC3 (2.6.9-Fred - stock kernel patched with 
alps touch pad driver)
Upgraded my ALSA drivers/lib/oss/utils to latest - 1.0.8
Card: Intel 82801DB-ICH4
Chip: SigmaTel STAC9750/51
sox: Version 12.17.5
---

Before I recently upgraded alsa, from stock alsa that came with FC3 to 
108 -- I used to route pretty much everyting (xmms, gaim sounds, gnome 
event sounds etc) thru ESD. I also would 'capture/record' some stuff via 
"esdmon | lame -x -m s - output.mp3" - basically that took whatever was 
sent to ESD and lamed it and stored it to a file (see script below if 
you are interested).

Now I have ditched ESD and just routed most/all sound stuff thru alsa 
(with dmix) directly. But how do I capture the mixed stream like I did 
with esdmon?   What device could I use for 'infile' on the sox command 
line?

And no I'd like to avoid running esd, or jack or any other sound server.

Here is the script if you are interested  (this is the one using esd - 
note I commented out some stuff from an earlier rev of this script  that 
just used OSS stuff & SOX - that had some problem that I don't recall). 
--------------
#!/bin/sh
fname=`date +"interval-music-RP-%m-%d-%Y-%I_%m%p.mp3"`
(Continue reading)

Kevin Cosgrove | 1 Apr 06:44 2005

Re: capture/record everything that goes to sound card (alsa) with SOX ???


I've had capture success with vsound.

YMMV...

--
Kevin

-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
Fred Welland | 1 Apr 16:10 2005
Picon
Picon

Re: capture/record everything that goes to sound card (alsa) with SOX ???

thx for pointing out vsound...however vsound looks like it only captures 
output from a single program.    What I really want/need is something 
that capture everything that my sound card 'plays'.

Kevin Cosgrove wrote:

>I've had capture success with vsound.
>
>YMMV...
>
>--
>Kevin
>
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by Demarc:
>A global provider of Threat Management Solutions.
>Download our HomeAdmin security software for free today!
>http://www.demarc.com/info/Sentarus/hamr30
>_______________________________________________
>Sox-users mailing list
>Sox-users <at> lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/sox-users
>
>  
>

-------------------------------------------------------
(Continue reading)

ttt | 9 Apr 23:35 2005
Picon

Sound problem with radio recording and second sound card

Hi,

i used to record radio to mp3-files with some small scripts and sox like 
it is described here: http://www.osl.iu.edu/~tveldhui/radio/

The sox-command for this is:

sox -v 1.0 -t ossdsp /dev/dsp -w -r 44100 -t cdr - &

It worked great until my on-board-sound-socket got damaged. I put in a 
second sound card. Everything is working now but not the recording... 
One channel is missing completely and the remaining channel has an 
absolutely dull sound.

Any ideas what the problem is?

Thank you,

Bodo

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Chris Bagwell | 10 Apr 22:44 2005

Re: Sound problem with radio recording and second sound card

This is probably not sox related but... Usually, /dev/dsp refers
to your first sound card and /dev/dsp1 would be your second.
Unless your able to disable the first/damaged sound card then you'll
need to upgrade all your scripts to point to /dev/dsp1.

Usually, you can disable onboard audio in the BIOS.

Chris

On Sat, Apr 09, 2005 at 11:35:52PM +0200, ttt wrote:
> Hi,
> 
> i used to record radio to mp3-files with some small scripts and sox like 
> it is described here: http://www.osl.iu.edu/~tveldhui/radio/
> 
> The sox-command for this is:
> 
> sox -v 1.0 -t ossdsp /dev/dsp -w -r 44100 -t cdr - &
> 
> It worked great until my on-board-sound-socket got damaged. I put in a 
> second sound card. Everything is working now but not the recording... 
> One channel is missing completely and the remaining channel has an 
> absolutely dull sound.
> 
> Any ideas what the problem is?
> 
> Thank you,
> 
> Bodo

(Continue reading)

ttt | 11 Apr 09:19 2005
Picon

Re: Sound problem with radio recording and second sound card

I did change /dev/dsp to /dev/dsp1 already: no change.

And I disabled the on-board-sound in BIOS: It did not help either.

Perhaps the problem has to do with ALSA. I read some things about 
problems with Sox and ALSA in this mailing list...

Bodo

Chris Bagwell schrieb:
> This is probably not sox related but... Usually, /dev/dsp refers
> to your first sound card and /dev/dsp1 would be your second.
> Unless your able to disable the first/damaged sound card then you'll
> need to upgrade all your scripts to point to /dev/dsp1.
> 
> Usually, you can disable onboard audio in the BIOS.
> 
> Chris
> 
> On Sat, Apr 09, 2005 at 11:35:52PM +0200, ttt wrote:
> 
>>Hi,
>>
>>i used to record radio to mp3-files with some small scripts and sox like 
>>it is described here: http://www.osl.iu.edu/~tveldhui/radio/
>>
>>The sox-command for this is:
>>
>>sox -v 1.0 -t ossdsp /dev/dsp -w -r 44100 -t cdr - &
>>
(Continue reading)

Chris Bagwell | 10 Apr 22:51 2005

Re: Split a file

On Thu, Mar 31, 2005 at 09:41:31AM -0800, Yoav wrote:
> Hi,
> Can I do the following using sox?
> I have some audio files which contain a recording of a
> person (like "hi my name is yoav") then a few seconds
> of silence and then some more words (like "thank you.
> good bye").
> I would like to split these files at the location
> where the first and long silence starts.
> 
> Is there a way to do that?
> 
> Thanks,
> Yoav

Perhaps... Please see the sox man page on the silence effect.
I say perhaps because lots of people complain that this effect
doesn't work reliably.

sox infile.wav outfile.wav silence 0 1 1s 1%

The above command would start copy infile into outfile starting
immediately and then stop after it see's 1 period with 1
second worth of silence.  It considers silence anything within
1% of total silence to allow for background noise.

The man page describes more details on how to tweak those values.

Chris

(Continue reading)

ttt | 10 Apr 23:06 2005
Picon

Re: Sound problem with radio recording and second sound card

I did change /dev/dsp to /dev/dsp1 already: no change.

And I disabled the on-board-sound in BIOS: It did not help either.

Perhaps the problem is with ALSA. I read some things about problems with 
Sox and ALSA in this mailing list...

Bodo

Chris Bagwell schrieb:
> This is probably not sox related but... Usually, /dev/dsp refers
> to your first sound card and /dev/dsp1 would be your second.
> Unless your able to disable the first/damaged sound card then you'll
> need to upgrade all your scripts to point to /dev/dsp1.
> 
> Usually, you can disable onboard audio in the BIOS.
> 
> Chris
> 
> On Sat, Apr 09, 2005 at 11:35:52PM +0200, ttt wrote:
> 
>>Hi,
>>
>>i used to record radio to mp3-files with some small scripts and sox like 
>>it is described here: http://www.osl.iu.edu/~tveldhui/radio/
>>
>>The sox-command for this is:
>>
>>sox -v 1.0 -t ossdsp /dev/dsp -w -r 44100 -t cdr - &
>>
(Continue reading)

Chris Bagwell | 10 Apr 23:44 2005

Re: converting audio file & saving to a memory-buffer

On Tue, Mar 29, 2005 at 11:33:18AM -0800, Jigish Patel wrote:
> Hi,
> I was wondering if one can use sox to convert audio
> format and store the result in a memory-buffer instead
> of a file. Also, similarly read audio data from
> memory-buffer and convert it to a different format and
> save it into a file.
> 
> I looked up the source code and it seems that sox
> internally uses fread and fwrites. I probably can't
> use stdin/stdout in a multithreaded environment. Is
> there any other option?

SoX wraps all its reads and writes with st_read() and st_write() which
is really just fread() and fwrite().  This was done specifically so that
SoX could one day read/write using buffers.  The reasons driving this
kinda few apart though and no one is actively working on that.

I'm sure you could hack something together by replacing those
functions.  Mostly, review the misc.c file and see what all you'd
need to replace to get it working with buffers.

Chris

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
(Continue reading)

Peter Deveaux | 15 Apr 20:27 2005
Picon

WAV File speed stretch not working

We are having issues “speeding up” a wav file by 10-20% without affecting the pitch.

 

Using sox-12.17.3 on Solaris 5.6.

 

WAV file parameters:

Reading Wave file: Microsoft PCM format, 1 channel, 11025 samp/sec

        22050 byte/sec, 2 block align, 16 bits/samp, 47042 data bytes

Input file Although.wav: using sample rate 11025 size shorts, encoding signed (2's complement), 1 channel

 

Command:

            sox input.wav speed.wav speed 1.1

                        Pitch is affected; an audible click is heard at the end of the output wave file

            sox input.wav stretch.wav stretch .9

                        Pitch not affected (or at least not very noticeable if affected), but voice comes out tinny/robotic

 

I then try:

            sox speed.wav speedpitch.wav pitch -1

                        but the pitch command does not seem to have any effect.

 

Has anyone used SoX for this successfully?

 

Thanks…Peter


Gmane