James-P-D / MeshSpeech

Meshtastic desktop client with text-to/from-speech in Python
MIT License
1 stars 0 forks source link

text to speech #1

Open cotteux opened 2 months ago

cotteux commented 2 months ago

I installed Meshspeech on windows 10 with python 3.11.9. Everything is update.

Resolve address and speech to text worked great but text to speech, I have this error when I received a message.

C:\MeshSpeech>python main.py ERROR:root:Unexpected error in deferred execution <class 'IndexError'> Traceback (most recent call last): File "C:\Users\Max\AppData\Local\Programs\Python\Python311\Lib\site-packages\meshtastic\util.py", line 243, in _run o() File "C:\Users\Max\AppData\Local\Programs\Python\Python311\Lib\site-packages\meshtastic\mesh_interface.py", line 1040, in lambda: pub.sendMessage(topic, packet=asDict, interface=self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Max\AppData\Local\Programs\Python\Python311\Lib\site-packages\pubsub\core\publisher.py", line 216, in sendMessage topicObj.publish(msgData) File "C:\Users\Max\AppData\Local\Programs\Python\Python311\Lib\site-packages\pubsub\core\topicobj.py", line 452, in publish self.sendMessage(msgData, topicObj, msgDataSubset) File "C:\Users\Max\AppData\Local\Programs\Python\Python311\Lib\site-packages\pubsub\core\topicobj.py", line 482, in sendMessage listener(data, self, allData) File "C:\Users\Max\AppData\Local\Programs\Python\Python311\Lib\site-packages\pubsub\core\listener.py", line 237, in call cb(kwargs) File "C:\MeshSpeech\main.py", line 77, in onReceive f"{sender_node['user']['shortName'][2]} "


IndexError: string index out of range
cotteux commented 2 months ago

Ok, i found what is the error. If a meshtastic short name was shorter than 4 chararcters, the error happen.