I could use some help with TwoToneDectect on Raspberry PI
I am attempting to run TwoToneDetect in a headless config.
It seems to me that I am having an issue with ffmpeg. It would also be nice to be able to cleanup the ALSA errors. Any pointers on how to fix my issue or cleanup the startup would be appreciated.
Thanks in advance -Jason
In the startup script I have this set (I also ran this before I started it in this test).
export PULSE_SOURCE=alsa_input.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-mono
export PULSE_SINK=alsa_output.usb-1130_USB_AUDIO-00.iec958-stereo
echo pacmd "set-default-source alsa_input.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-mono"
pacmd "set-default-source alsa_input.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-mono"
echo pacmd "set-default-sink alsa_output.usb-1130_USB_AUDIO-00.iec958-stereo"
pacmd "set-default-sink alsa_output.usb-1130_USB_AUDIO-00.iec958-stereo"
./TwoToneDetect70
ALSA lib confmisc.c:1281
snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4528
_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007
snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495
snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2495
snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495
snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495
snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281
snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528
_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007
snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495
snd_pcm_open_noupdate) Unknown PCM surround21
(DELETED content in the attached .txt file PHPBB isn't letting me add it to the post)
(DELETED content in the attached .txt file PHPBB isn't letting me add it to the post)
(DELETED content in the attached .txt file PHPBB isn't letting me add it to the post)
ALSA lib pcm.c:2495
snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
connect(2) call to jackdmp 1.9.11/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
333.0 83.8475308849
1597.0 27544.0785684
1597.0 27662.6686112
1597.0 27573.8397111
1597.0 27623.6602665
1597.0 27715.621431
709.0 27734.1894807
709.0 27634.3180244
709.0 27554.8656511
709.0 27656.6093917
709.0 27828.8299259
709.0 27726.759386
704.0 27741.2696513
704.0 27420.3042394
704.0 27668.7594121
704.0 27476.1988409
704.0 27702.4117303
704.0 27697.2296668
704.0 27712.4056154
704.0 27651.4991278
704.0 27449.3701473
WESTPORT VFD Tone Set Found
0
after record
delay timer WESTPORT VFD 19:59:50 on 03/23/18
1.0
delay done WESTPORT VFD 19:59:51 on 03/23/18
waiting for audio WESTPORT VFD 19:59:51 on 03/23/18
threshold value: 45
mono
704.0 27741.4906057
704.0 27728.1981708
333.0 944.999488055
596.0 845.608780562
306.0 934.843035639
478.0 931.187865716
349.0 4001.18675905
threshold exceeded
recording audio WESTPORT VFD 19:59:51 on 03/23/18
iterations: 600
Traceback (most recent call last):
File "TwoToneDetect70.py", line 716, in alert
File "dist-packages/pyaudio.py", line 577, in write
File "dist-packages/pyaudio.py", line 577, in write
IOError: [Errno Not output stream] -9974
505.0 14275.8662322
301.0 3509.69838435
ffmpeg version 3.2.10-1~deb9u1+rpt1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1+rpt1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
WARNING: library configuration mismatch
avcodec configuration: --prefix=/usr --extra-version='1~deb9u1+rpt1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc --enable-netcdf
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
./audio/WESTPORT_VFD_2018_03_23_19_59_50.wav: No such file or directory
done converting to MP3 WESTPORT VFD 19:59:52 on 03/23/18
360.0 2649.1768129
306.0 1351.7562429
ffmpeg version 3.2.10-1~deb9u1+rpt1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1+rpt1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
WARNING: library configuration mismatch
avcodec configuration: --prefix=/usr --extra-version='1~deb9u1+rpt1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc --enable-netcdf
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
./audio/WESTPORT_VFD_2018_03_23_19_59_50.wav: No such file or directory
done converting to AMR WESTPORT VFD 19:59:52 on 03/23/18
Traceback (most recent call last):
File "TTD70.py", line 61, in mail
IOError: [Errno 2] No such file or directory: './audio/WESTPORT_VFD_2018_03_23_19_59_50.mp3'
Email not sent via smtp.gmail.com on port 587 using STARTTLS on attempt 1 trying again in five seconds for WESTPORT VFD Page Received at 19:59:50 on 03/23/18
543.0 3251.52895654
360.0 997.149913044
2548.0 17878.8315314
Traceback (most recent call last):
File "TTD70.py", line 61, in mail
IOError: [Errno 2] No such file or directory: './audio/WESTPORT_VFD_2018_03_23_19_59_50.mp3'
Email not sent via smtp.gmail.com on port 587 using STARTTLS on attempt 2 trying again in five seconds for WESTPORT VFD Page Received at 19:59:50 on 03/23/18
Traceback (most recent call last):
File "TTD70.py", line 61, in mail
IOError: [Errno 2] No such file or directory: './audio/WESTPORT_VFD_2018_03_23_19_59_50.mp3'
Email not sent via smtp.gmail.com on port 587 using STARTTLS on attempt 3 trying again in five seconds for WESTPORT VFD Page Received at 19:59:50 on 03/23/18
max retries exceeded, failed to send email
Traceback (most recent call last):
File "TwoToneDetect70.py", line 976, in alert
OSError: [Errno 2] No such file or directory: './audio/WESTPORT_VFD_2018_03_23_19_59_50.wav'
As for the access to sending e-mail the port is open:
pi@pi3:~/TTD $ telnet smtp.gmail.com 587
Trying 173.194.208.108...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
220 smtp.gmail.com ESMTP r9sm1498581qtm.75 - gsmtp
^]
telnet> quit
Connection closed.