OK this works for me.
gst-launch-1.0 pulsesrc device=alsa_input.usb-0c76_USB_Audio_Device-00.mono-fallback ! filesink location=test.wav
bsoering@Bienenstand:~$ gst-launch-1.0 pulsesrc device=alsa_input.usb-0c76_USB_Audio_Device-00.mono-fallback ! filesink location=test.wav
Leitung wird auf PAUSIERT gesetzt ...
Leitung ist aktiv und erfordert keinen VORLAUF …
Leitung wird auf ABSPIELEN gesetzt ...
New clock: GstPulseSrcClock
Verzögerung neu verteilen …
^Chandling interrupt.
Interrupt: Leitung wird gestoppt ...
Execution ended after 0:00:30.500382395
Leitung wird auf PAUSIERT gesetzt ...
Leitung wird auf BEREIT gesetzt ...
Leitung wird auf NULL gesetzt ...
Leitung wird geleert ...
but in the bash with saraswati it does not work.
saraswati record --channel="testdrive source=alsa_input.usb-0c76_USB_Audio_Device-00.mono-fallback" --upload="rsync://User@xxx.xxx.xxx.xx:xx"
2021-06-22 22:02:25,692 [saraswati.recorder] INFO : Setting up audio recorder
2021-06-22 22:02:25,838 [saraswati.recorder] INFO : Spool location: /home/bsoering/.local/share/saraswati/spool/recording_{channel}_{timestamp}_{fragment:04d}.mka
2021-06-22 22:02:25,839 [saraswati.recorder] INFO : Chunk duration: 300 seconds
2021-06-22 22:02:25,839 [saraswati.recorder] INFO : Maximum number of file fragments: 9999
2021-06-22 22:02:25,840 [saraswati.recorder] INFO : Adding channel "testdrive" on audio source "alsa_input.usb-0c76_USB_Audio_Device-00.mono-fallback"
Traceback (most recent call last):
File "/home/bsoering/.local/bin/saraswati", line 8, in <module>
sys.exit(cli())
File "/home/bsoering/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/bsoering/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/bsoering/.local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/bsoering/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/bsoering/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/bsoering/.local/lib/python3.8/site-packages/saraswati/cli.py", line 234, in record
recorder.add_channel(name=channel.name, source=channel.source)
File "/home/bsoering/.local/lib/python3.8/site-packages/saraswati/recorder.py", line 175, in add_channel
pipeline_gst = Gst.parse_launch(pipeline_expression)
gi.repository.GLib.Error: gst_parse_error: unexpected reference "alsa_input" - ignoring (0)
by using sudo saraswati setup --systemd
The log is too long to show it here.
Jun 22 22:28:11 Bienenstand sh[263882]: rsync error: syntax or usage error (code 1) at options.c(2369) [client=3.1.3]
Jun 22 22:28:11 Bienenstand sh[263882]: 2021-06-22 22:28:11,331 [saraswati.uploader] ERROR : Error while uploading
Jun 22 22:28:11 Bienenstand sh[263882]: Traceback (most recent call last):
Jun 22 22:28:11 Bienenstand sh[263882]: File "/usr/local/lib/python3.8/dist-packages/saraswati/uploader.py", line 49, in run
Jun 22 22:28:11 Bienenstand sh[263882]: self.upload()
Jun 22 22:28:11 Bienenstand sh[263882]: File "/usr/local/lib/python3.8/dist-packages/saraswati/uploader.py", line 106, in upload
Jun 22 22:28:11 Bienenstand sh[263882]: raise ChildProcessError(message)
Jun 22 22:28:11 Bienenstand sh[263882]: ChildProcessError: Rsync command failed: rsync version 3.1.3 protocol version 31
Jun 22 22:28:11 Bienenstand sh[263882]: Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others.
Jun 22 22:28:11 Bienenstand sh[263882]: Web site: http://rsync.samba.org/
Jun 22 22:28:11 Bienenstand sh[263882]: Capabilities:
Jun 22 22:28:11 Bienenstand sh[263882]: 64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
Jun 22 22:28:11 Bienenstand sh[263882]: socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
Jun 22 22:28:11 Bienenstand sh[263882]: append, ACLs, xattrs, iconv, symtimes, prealloc
Jun 22 22:28:11 Bienenstand sh[263882]: rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
Jun 22 22:28:11 Bienenstand sh[263882]: are welcome to redistribute it under certain conditions. See the GNU
Jun 22 22:28:11 Bienenstand sh[263882]: General Public Licence for details.
Jun 22 22:28:11 Bienenstand sh[263882]: rsync is a file transfer program capable
Config File:
# Use real hardware devices
SARASWATI_CHANNEL_1='channel1 source=alsasrc device="hw:0"'
SARASWATI_CHANNEL_2='channel2 source=alsasrc device="hw:1"'
# SARASWATI_CHANNEL_3='channel3 source=alsasrc device="hw:2"'
# SARASWATI_CHANNEL_4='channel4 source=alsasrc device="hw:3"'
# Use sine wave generators
# SARASWATI_CHANNEL_10="testdrive1 source=audiotestsrc wave=3 freq=200"
# SARASWATI_CHANNEL_11="testdrive2 source=audiotestsrc wave=3 freq=400"
# SARASWATI_CHANNEL_12="testdrive3 source=audiotestsrc wave=3 freq=600"
# SARASWATI_CHANNEL_13="testdrive4 source=audiotestsrc wave=3 freq=800"
# Configure spool directory
SARASWATI_SPOOL_PATH=/var/spool/saraswati
# Configure chunking
# SARASWATI_CHUNK_DURATION=300
# Configure rsync upload
SARASWATI_UPLOAD_TARGET="rsync://MKO1640@192.168.188.70:saraswati/"
SARASWATI_UPLOAD_INTERVAL=300