Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kalliopé bug after one use #167

Closed
tazou opened this issue Jan 3, 2017 · 4 comments
Closed

Kalliopé bug after one use #167

tazou opened this issue Jan 3, 2017 · 4 comments
Labels
Milestone

Comments

@tazou
Copy link

tazou commented Jan 3, 2017

Hello,
When I use the hotword Kalliopé the first time, it's working, but then if I try to use it again it fail.

I launch Kalliopé in debug mode and we can see an error related to threads.

I'm on Debian 8, with Python 2.7.9 and I install Kalliopé with pip.

Log :
gui@laptop:~/kalliope_starter_fr$ kalliope --debug start
2017-01-03 23:47:57,020 :: DEBUG :: Logger ready
2017-01-03 23:47:57,020 :: DEBUG :: kalliope args: Namespace(action='start', brain_file=None, debug=True, git_url=None, run_synapse=None)
2017-01-03 23:47:57,020 :: DEBUG :: Try to load file from 1: /home/gui/kalliope_starter_fr/brain.yml
2017-01-03 23:47:57,020 :: DEBUG :: File found in /home/gui/kalliope_starter_fr/brain.yml
2017-01-03 23:47:57,021 :: DEBUG :: File path to load: /home/gui/kalliope_starter_fr/brain.yml
2017-01-03 23:47:57,035 :: DEBUG :: File path to load: /home/gui/kalliope_starter_fr/brain.yml
2017-01-03 23:47:57,050 :: DEBUG :: Try to load file from 1: /home/gui/kalliope_starter_fr/settings.yml
2017-01-03 23:47:57,050 :: DEBUG :: File found in /home/gui/kalliope_starter_fr/settings.yml
2017-01-03 23:47:57,051 :: DEBUG :: File path to load: /home/gui/kalliope_starter_fr/settings.yml
2017-01-03 23:47:57,065 :: DEBUG :: File path to load: /home/gui/kalliope_starter_fr/settings.yml
2017-01-03 23:47:57,078 :: DEBUG :: Default STT: google
2017-01-03 23:47:57,078 :: DEBUG :: Default TTS: pico2wave
2017-01-03 23:47:57,078 :: DEBUG :: Default Trigger name: snowboy
2017-01-03 23:47:57,079 :: DEBUG :: Default synapse: default-synapse
2017-01-03 23:47:57,079 :: DEBUG :: Resource directory synapse: {'stt': 'resources/stt', 'tts': 'resources/tts', 'neuron': 'resources/neurons'}
Starting event manager
Events loaded
Starting Kalliope
Press Ctrl+C for stopping
Starting REST API Listening port: 5000
2017-01-03 23:47:57,137 :: DEBUG :: TriggerLauncher: Start trigger snowboy with parameters: {'callback': <bound method MainController.callback of <kalliope.core.MainController.MainController instance at 0x7f9e342f6ea8>>, 'pmdl_file': 'trigger/kalliope-FR.pmdl'}
2017-01-03 23:47:57,137 :: DEBUG :: Run plugin snowboy with parameter {'callback': <bound method MainController.callback of <kalliope.core.MainController.MainController instance at 0x7f9e342f6ea8>>, 'pmdl_file': 'trigger/kalliope-FR.pmdl'}
2017-01-03 23:47:57,144 :: DEBUG :: Try to load file from 1: /home/gui/kalliope_starter_fr/trigger/kalliope-FR.pmdl
2017-01-03 23:47:57,145 :: DEBUG :: File found in /home/gui/kalliope_starter_fr/trigger/kalliope-FR.pmdl
2017-01-03 23:47:57,209 :: DEBUG :: detecting...
2017-01-03 23:47:59,994 :: INFO :: Keyword 1 detected at time: 2017-01-03 23:47:59
2017-01-03 23:47:59,995 :: DEBUG :: Pausing snowboy process
2017-01-03 23:47:59,995 :: DEBUG :: Run plugin Google with parameter {'callback': <bound method MainController.analyse_order of <kalliope.core.MainController.MainController instance at 0x7f9e342f6ea8>>, 'language': 'fr-FR'}
2017-01-03 23:48:00,010 :: DEBUG :: NeuronModule called from class Say with parameters: {'message': ['Oui monsieur?', u'Je vous \xe9coute', 'Monsieur?', 'Que puis-je faire pour vous?', u"J'\xe9coute", 'Oui?']}
2017-01-03 23:48:00,011 :: DEBUG :: NeuronModule Say() called with message: ['Oui monsieur?', u'Je vous \xe9coute', 'Monsieur?', 'Que puis-je faire pour vous?', u"J'\xe9coute", 'Oui?']
2017-01-03 23:48:00,011 :: DEBUG :: message is list
2017-01-03 23:48:00,011 :: DEBUG :: tts_message to say: Que puis-je faire pour vous?
2017-01-03 23:48:00,012 :: DEBUG :: NeuroneModule: TTS args: Tts name: pico2wave, parameters: {'cache': True, 'language': 'fr-FR'}
2017-01-03 23:48:00,021 :: DEBUG :: Run plugin pico2wave with parameter {'cache': True, 'language': 'fr-FR'}
2017-01-03 23:48:00,023 :: DEBUG :: Class TTSModule called from module Pico2wave, cache: True, language: fr-FR, voice: default
2017-01-03 23:48:00,023 :: DEBUG :: get_path_to_store_audio return: /tmp/kalliope_tts_cache/Pico2wave/fr-FR/default/318d2af18343ed4d104e3259fa7ea866.tts
2017-01-03 23:48:00,024 :: DEBUG :: TTSModule, File already in cache: /tmp/kalliope_tts_cache/Pico2wave/fr-FR/default/318d2af18343ed4d104e3259fa7ea866.tts
2017-01-03 23:48:00,024 :: DEBUG :: Mplayer cmd: ['/usr/bin/mplayer', '-slave', '-quiet', '/tmp/kalliope_tts_cache/Pico2wave/fr-FR/default/318d2af18343ed4d104e3259fa7ea866.tts']
Say something!
Google Speech Recognition thinks you said quelle heure est-il
2017-01-03 23:48:07,062 :: DEBUG :: OrderAnalyser, Received order: quelle heure est-il
2017-01-03 23:48:07,067 :: DEBUG :: [orderAnalyser.start]-> No Synapse provided, let's find one
2017-01-03 23:48:07,086 :: DEBUG :: Order found! Run neurons: [<kalliope.core.Models.Neuron.Neuron object at 0x7f9e34366990>]
Order matched in the brain. Running synapse "say-local-date"
2017-01-03 23:48:07,098 :: DEBUG :: [orderAnalyser.start]-> Grab the params
2017-01-03 23:48:07,126 :: DEBUG :: Run plugin "systemdate" with parameters {'say_template': ['il est {{ hours }} heure et {{ minutes }} minute']}
2017-01-03 23:48:07,174 :: DEBUG :: Run plugin systemdate with parameter {'say_template': ['il est {{ hours }} heure et {{ minutes }} minute']}
2017-01-03 23:48:07,261 :: DEBUG :: NeuronModule called from class Systemdate with parameters: {'cache': False, 'say_template': ['il est {{ hours }} heure et {{ minutes }} minute']}
2017-01-03 23:48:07,266 :: DEBUG :: NeuronModule Say() called with message: {'day_month': '03', 'month': '01', 'hours': '23', 'weekday': '2', 'year': '2017', 'minutes': '48'}
2017-01-03 23:48:07,318 :: DEBUG :: message is dict
2017-01-03 23:48:07,334 :: DEBUG :: tts_message to say: il est 23 heure et 48 minute
2017-01-03 23:48:07,417 :: DEBUG :: args for TTS plugin before update: {'cache': True, 'language': 'fr-FR'}
2017-01-03 23:48:07,418 :: DEBUG :: args for TTS plugin after update: {'cache': False, 'language': 'fr-FR'}
2017-01-03 23:48:07,550 :: DEBUG :: NeuroneModule: TTS args: Tts name: pico2wave, parameters: {'cache': False, 'language': 'fr-FR'}
2017-01-03 23:48:07,590 :: DEBUG :: Run plugin pico2wave with parameter {'cache': False, 'language': 'fr-FR'}
2017-01-03 23:48:07,596 :: DEBUG :: Class TTSModule called from module Pico2wave, cache: False, language: fr-FR, voice: default
2017-01-03 23:48:07,596 :: DEBUG :: get_path_to_store_audio return: /tmp/kalliope_tts_cache/Pico2wave/fr-FR/default/7e67e7c5163ea7b9b7c9b49ef1ec70ba.tts
2017-01-03 23:48:07,609 :: DEBUG :: Pico2wave command: ['/usr/bin/pico2wave', '-l=fr-FR', '-w=/tmp/kalliope_tts_cache/Pico2wave/fr-FR/default/7e67e7c5163ea7b9b7c9b49ef1ec70ba.tts.wav', u'il est 23 heure et 48 minute']
2017-01-03 23:48:07,828 :: DEBUG :: Mplayer cmd: ['/usr/bin/mplayer', '-slave', '-quiet', '/tmp/kalliope_tts_cache/Pico2wave/fr-FR/default/7e67e7c5163ea7b9b7c9b49ef1ec70ba.tts']
Waiting for trigger detection
2017-01-03 23:48:10,844 :: DEBUG :: Unpausing snowboy process
2017-01-03 23:48:11,001 :: INFO :: Keyword 1 detected at time: 2017-01-03 23:48:11
2017-01-03 23:48:11,003 :: DEBUG :: Pausing snowboy process
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/kalliope/trigger/snowboy/snowboydecoder.py", line 153, in run
callback()
File "/usr/local/lib/python2.7/dist-packages/kalliope/core/MainController.py", line 53, in callback
self.order_listener.start()
File "/usr/lib/python2.7/threading.py", line 739, in start
raise RuntimeError("threads can only be started once")
RuntimeError: threads can only be started once

^C

Ctrl+C pressed. Killing Kalliope

Thank you,
Guillaume.

@LaMonF LaMonF added the bug label Jan 4, 2017
@LaMonF LaMonF added this to the v0.5.0 milestone Jan 4, 2017
@LaMonF
Copy link
Member

LaMonF commented Jan 9, 2017

Hi @tazou,

Do you stil have this issue ?
It seems like you have a running background thread.

@tazou
Copy link
Author

tazou commented Jan 9, 2017 via email

@LaMonF LaMonF closed this as completed Jan 10, 2017
@Sispheor Sispheor reopened this Jan 10, 2017
@Sispheor
Copy link
Member

I re open this issue as I can confirm it on my Rpi 2

@LaMonF LaMonF modified the milestones: v0.4.1, v0.4.2 Jan 11, 2017
@Sispheor
Copy link
Member

Should be fixed in the last version 0.4.1. #190

Don't hesitate to reopen the issue if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants