Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] SOX not recording

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
rick71
Posts: 85
Joined: 2015-07-02 02:12
Been thanked: 1 time

[Solved] SOX not recording

#1 Post by rick71 »

Raspberry Pi 3+, Bullseye, Sox 14.4.2, Audacity 2.4.2, USB soundcard. I'm trying to produce timestamed sound files, preferably in the file name, but that can be edited later.

AUDIODEV=hw:1 rec -r 44100 TX.ogg silence 1 3.0 5% 1 7.0 5% : newfile : restart

record command starts, creates TX001.ogg, timer shows the script running, but it seems nothing is recorded and nothing is saved.

When using Audacity, Software Activated recording enabled, input is captured and can be saved/exported.. Audacity is showing input is on the left channel.

Can anyone point out what I may be doing wrong?
Thanks.
Last edited by rick71 on 2024-03-10 04:07, edited 1 time in total.

rick71
Posts: 85
Joined: 2015-07-02 02:12
Been thanked: 1 time

Re: [Software] SOX not recording

#2 Post by rick71 »

Adding AUDIODRIVER=alsa immediately after AUDIODEV=hw:1 has allowed some audio to be recorded, saved and the script restarted. I'll have to play with the numbers to get the recording start/save/restart working properly. I'll also have to look into saving the file with a timestamp name instead of an incremented name.

friendlysalmon88
Posts: 50
Joined: 2023-12-08 16:48
Location: Seattle,Wa USA
Has thanked: 3 times
Been thanked: 3 times

Re: [Software] SOX not recording

#3 Post by friendlysalmon88 »

I do believe that Buster is abut to reach it's end of life cycle in a couple of months. I'd strongly recommend that that the OP look into either Debian 1o(buster) or Debian 12(bookworm).


Debian 10 Buster reaches it's EOL aon June 30th of this year.
Debian 11 (Bulleye) Reaches its EOL on June 30th 2026.
Debian 12 (bbokworm) 12 (BookWorm) June 30th,2028

So I'd strongly recommend that the OP consider one of the last two releases that are listed up above.

User avatar
oswaldkelso
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1497
Joined: 2005-07-26 23:20
Location: UK
Has thanked: 1 time
Been thanked: 60 times

Re: [Software] SOX not recording

#4 Post by oswaldkelso »

This is what I use.

Code: Select all

sox -t alsa sysdefault:CARD=A900 ./record.wav silence 1 0.1 5% 1 2.0 5%
Run

Code: Select all

arecord -L
to get the name of the mic you want to use. This is a better way as hw1 might change it's card on reboot unless you've previously set your card loading order.

Wav gave me the best results while recording and it's very easy to re-encode later.
Free Software Matters
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
My oldest used PC: 1999 imac 333Mhz 256MB PPC abandoned by Debian

User avatar
sunrat
Administrator
Administrator
Posts: 6511
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 119 times
Been thanked: 489 times

Re: [Software] SOX not recording

#5 Post by sunrat »

friendlysalmon88 wrote: 2024-03-09 16:37 I do believe that Buster is abut to reach it's end of life cycle in a couple of months. I'd strongly recommend that that the OP look into either Debian 1o(buster) or Debian 12(bookworm).


Debian 10 Buster reaches it's EOL aon June 30th of this year.
Debian 11 (Bulleye) Reaches its EOL on June 30th 2026.
Debian 12 (bbokworm) 12 (BookWorm) June 30th,2028

So I'd strongly recommend that the OP consider one of the last two releases that are listed up above.
Stop posting irrelevant comments. OP is using Bullseye.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

rick71
Posts: 85
Joined: 2015-07-02 02:12
Been thanked: 1 time

Re: [Software] SOX not recording - SOLVED

#6 Post by rick71 »

I have adjusted the recording numbers and prepared a bash script. All seems to be working for now, including saving file with the timestamp in the file name..

Thanks all.

Post Reply