Open GGB195 opened 1 year ago
I suspect that you may be using a different websocket package than what this script is expecting. It expects to use this one:
https://github.com/websocket-client/websocket-client
which should be installed by doing pip3 install websocket-client
You can check to see what Python is using for the websocket package by doing this from a Python terminal:
import websocket
help(websocket.__package__)
You should then get something that looks like this:
Help on package websocket:
NAME
websocket
DESCRIPTION
__init__.py
websocket - WebSocket client library for Python
Copyright 2022 engn33r
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
If you get something else, you may have a different websocket package installed that's being used instead of the one that's expected.
I am not sure where I am going wrong. I have followed the steps, but clearly I have either changed something or I have missed something. Attached is the what is returning when I run python3 zellostream.py
pi@pi:~/zellostream $ python3 zellostream.py ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21 ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21 ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40 ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41 ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50 ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51 ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71 ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback ALSA lib conf.c:5200:(snd_config_expand) Unknown parameters {AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 1} ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM iec958:{AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 1} ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock 2023-01-03 20:43:38,174 E start_audio: input_pulse_name is Virtual_Sink.monitor 2023-01-03 20:43:38,206 E start_audio: output_pulse_name is Virtual_Sink 2023-01-03 20:43:40,245 E create_zello_connection: exception: module 'websocket' has no attribute 'create_connection' 2023-01-03 20:43:40,246 W main: cannot establish connection for incoming 2023-01-03 20:43:41,306 E create_zello_connection: exception: module 'websocket' has no attribute 'create_connection' 2023-01-03 20:43:41,306 W main: cannot establish connection for incoming 2023-01-03 20:43:42,369 E create_zello_connection: exception: module 'websocket' has no attribute 'create_connection' 2023-01-03 20:43:42,369 W main: cannot establish connection for incoming 2023-01-03 20:43:43,410 E create_zello_connection: exception: module 'websocket' has no attribute 'create_connection' 2023-01-03 20:43:43,411 W main: cannot establish connection for incoming 2023-01-03 20:43:44,451 E create_zello_connection: exception: module 'websocket' has no attribute 'create_connection' 2023-01-03 20:43:44,451 W main: cannot establish connection for incoming 2023-01-03 20:43:45,494 E create_zello_connection: exception: module 'websocket' has no attribute 'create_connection' 2023-01-03 20:43:45,494 W main: cannot establish connection for incoming 2023-01-03 20:43:46,540 E create_zello_connection: exception: module 'websocket' has no attribute 'create_connection' 2023-01-03 20:43:46,540 W main: cannot establish connection for incoming 2023-01-03 20:43:47,584 E create_zello_connection: exception: module 'websocket' has no attribute 'create_connection' 2023-01-03 20:43:47,584 W main: cannot establish connection for incoming ^C2023-01-03 20:43:48,617 E main: keyboard interrupt caught 2023-01-03 20:43:48,619 I main: terminating
Here is the config.json set up (I am removing the Password and issuer.` "username": "Username", "password": "password", "zello_channel": "FDH P25 Traffic", "issuer": "key", "vox_silence_time": 3, "audio_threshold": 1000, "input_device_index": 1, "input_pulse_name": "Virtual_Sink.monitor", "output_device_index": 1, "output_pulse_name": "Virtual_Sink", "zello_input_sample_rate": 16000, "audio_input_sample_rate": 48000, "in_channel_config": "mono", "audio_input_channels": 1, "audio_output_sample_rate": 48000, "audio_output_channels": 1, "audio_output_volume": 1.5, "logging_level": "info", "TGID_in_stream": true, "TGID_to_play": 58917, "UDP_PORT": 9123 }
`