project-alice-assistant / projectalice Goto Github PK
View Code? Open in Web Editor NEWMain repository of Project Alice, contains main unit source code
License: GNU General Public License v3.0
Main repository of Project Alice, contains main unit source code
License: GNU General Public License v3.0
Starting AliceSatellite module
- Coulnd't start module AliceSatellite. Did you forget to return the intents in onStart()? Error: Invalid subscription filter.
Starting ContextSensitive module
- Coulnd't start module ContextSensitive. Did you forget to return the intents in onStart()? Error: Invalid subscription filter.
Starting DateDayTimeYear module
- Coulnd't start module DateDayTimeYear. Did you forget to return the intents in onStart()? Error: Invalid subscription filter.
[RedQueen] New Red Queen is born
Starting RedQueen module
- Coulnd't start module RedQueen. Did you forget to return the intents in onStart()? Error: Invalid subscription filter.
Exception in thread Thread-33:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/threading.py", line 1158, in run
self.function(*self.args, **self.kwargs)
File "/home/pi/ProjectAlice/core/util/ThreadManager.py", line 66, in onTimerEnd
t.callback(*t.args)
File "/home/pi/ProjectAlice/modules/AliceCore/AliceCore.py", line 92, in onStart
return super().onStart()
File "/home/pi/ProjectAlice/core/base/model/Module.py", line 156, in onStart
self.MqttManager.subscribeModuleIntents(self.name)
File "/home/pi/ProjectAlice/core/server/MqttManager.py", line 129, in subscribeModuleIntents
self.ModuleManager.getModuleInstance(moduleName).subscribe(self._mqttClient)
File "/home/pi/ProjectAlice/core/base/model/Module.py", line 87, in subscribe
mqttClient.subscribe(str(intent))
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1311, in subscribe
raise ValueError('Invalid subscription filter.')
ValueError: Invalid subscription filter.
The basics should be documented on the github wiki, to allow a community to start creating and helping
For the alpha, covering up the module creation is needed, from install file to available methods and guidelines, as well as documenting our code style
[WakewordManager] Error capturing wakeword: [Errno -9981] Input overflowed
Sound file /tmp/1.wav doesn't exist
Traceback (most recent call last):
File "/home/pi/ProjectAlice/core/server/MqttManager.py", line 204, in onMessage
consumed = module.onMessage(message.topic, session)
File "/home/pi/ProjectAlice/modules/AliceCore/AliceCore.py", line 462, in onMessage
self.WakewordManager.trimLess()
File "/home/pi/ProjectAlice/core/voice/WakewordManager.py", line 150, in trimLess
self._workAudioFile(len(self._wakeword.samples))
File "/home/pi/ProjectAlice/core/voice/WakewordManager.py", line 131, in _workAudioFile
sound = AudioSegment.from_file(Path(tempfile.gettempdir(), '{}_raw.wav'.format(number)), format='wav', frame_rate=self.ConfigManager.getAliceConfigByName('micSampleRate'))
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/pydub/audio_segment.py", line 610, in from_file
file = _fd_or_path_or_tempfile(file, 'rb', tempfile=False)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/pydub/utils.py", line 61, in _fd_or_path_or_tempfile
fd = open(fd, mode=mode)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/0_raw.wav'
None
[MqttManager] Uncaught error in onMessage: [Errno 2] No such file or directory: '/tmp/0_raw.wav'
to redo the "welcome .. new user" I deleted the data.db and restarted her. She continuously loops repeating the message and not stopping for a response.
No errors displayed, snips just shows the welcome message.
Ideas:
Main and most used methods throughout Project Alice
Currently where I see a problem is starting at the Welcome ... , she did ask for a name, snips got it right and that was the end of the process. Using a previous data.db she responds to "time" request on the first request from a restart. The second request for "the date" is decoded properly but there is no response and snips times out. Apparently the time issue was a python thing that was repaired with an upgrade :) That is all I got for now
https://docs.quantifiedcode.com/python-anti-patterns/
Anti patterns are behavior we learned in another language that are a nuisance for python 3. Many have already been reworked, many are still open
Starting ModuleManager
[ModuleManager] Couldn't import module AliceCore.AliceCore: No module named 'modules.AliceCore.AliceCore'
[ModuleManager] Couldn't import module AliceSatellite.AliceSatellite: No module named 'modules.AliceSatellite.AliceSatellite'
[ModuleManager] Couldn't import module ContextSensitive.ContextSensitive: No module named 'modules.ContextSensitive.ContextSensitive'
[ModuleManager] Couldn't import module DateDayTimeYear.DateDayTimeYear: No module named 'modules.DateDayTimeYear.DateDayTimeYear'
[ModuleManager] Couldn't import module RedQueen.RedQueen: No module named 'modules.RedQueen.RedQueen'
[ModuleManager] Method "onBooted" not found for module "PhilipsHue": 'morning'
[SamkillaManager] Error while sending POST request: {"status":409,"message":{"message":"already exists: intent name GetCo2Level","status":"error"}}
Duplicate intent with name GetCo2Level
[Sync] Intent model intent_yMKMneQBbDO = GetCo2Level has been created
Error repeats for all intents until last one
name AnswerAccessLevel is good
Hi!
I hope that I don't become annoying posting one issue after the other, but anyway, here's a new one:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/alice/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2913, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/home/alice/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1578, in loop_forever
rc = self.loop(timeout, max_packets)
File "/home/alice/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1072, in loop
rc = self.loop_read(max_packets)
File "/home/alice/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1374, in loop_read
rc = self._packet_read()
File "/home/alice/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2071, in _packet_read
rc = self._packet_handle()
File "/home/alice/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2560, in _packet_handle
return self._handle_publish()
File "/home/alice/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2759, in _handle_publish
self._handle_on_message(message)
File "/home/alice/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2902, in _handle_on_message
callback(self, self._userdata, message)
File "/home/alice/ProjectAlice/core/server/MqttManager.py", line 287, in onSnipsCaptured
SuperManager.getInstance().broadcast(method='onCaptured', exceptions=[self.name], propagateToModules=True, session=session)
File "/home/alice/ProjectAlice/core/base/SuperManager.py", line 176, in broadcast
func(*args, **kwargs)
File "/home/alice/ProjectAlice/core/voice/WakewordManager.py", line 64, in onCaptured
self._workAudioFile()
File "/home/alice/ProjectAlice/core/voice/WakewordManager.py", line 131, in _workAudioFile
self.wakeword.getSample().close()
File "/usr/lib/python3.7/wave.py", line 445, in close
self._ensure_header_written(0)
File "/usr/lib/python3.7/wave.py", line 463, in _ensure_header_written
raise Error('# channels not specified')
wave.Error: # channels not specified
I'm running the alpha2 branch, ec1fc21.
I was doing the initial Alice dialogue ("Welcome to Project Alice...") and wanted to record a custom wakeword. I don't understand the code nor what should be happening good enough to describe the problem any more detailed than what the exception says - number of channels not specified.
Please let me know if I can help somehow.
Thanks!
[INFO] - [ModuleManager] Now taking care of module Telemetry
[ERROR] - [ModuleManager] Failed installing module "/home/pi/ProjectAlice/system/moduleInstallTickets/Telemetry": Expecting value: line 1 column 1 (char 0)
[INFO] - [ModuleManager] Found 1 install ticket(s)
[INFO] - [ModuleManager] Now taking care of module Telemetry
[ERROR] - [ModuleManager] Failed installing module "/home/pi/ProjectAlice/system/moduleInstallTickets/Telemetry": Expecting value: line 1 column 1 (char 0)
As you can see here: http://prntscr.com/pej0no
Tabulations are wrong during module installation from console.
Sound file /home/pi/ProjectAlice/var/cache/pico/en-US/male/en-US/3f5a69d11cf84902cb0d83ae5a552ebe.wav doesn't exist
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2913, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1578, in loop_forever
rc = self.loop(timeout, max_packets)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1072, in loop
rc = self.loop_read(max_packets)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1374, in loop_read
rc = self._packet_read()
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2071, in _packet_read
rc = self._packet_handle()
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2560, in _packet_handle
return self._handle_publish()
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2759, in _handle_publish
self._handle_on_message(message)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2902, in _handle_on_message
callback(self, self._userdata, message)
File "/home/pi/ProjectAlice/core/server/MqttManager.py", line 359, in onSnipsSay
SuperManager.getInstance().broadcast(method='onSay', exceptions=[self.name], args=[session], propagateToModules=True)
File "/home/pi/ProjectAlice/core/base/SuperManager.py", line 174, in broadcast
func(*args)
File "/home/pi/ProjectAlice/core/voice/TTSManager.py", line 95, in onSay
self._tts.onSay(session)
File "/home/pi/ProjectAlice/core/voice/model/PicoTTS.py", line 79, in onSay
self._speak(file=self._cacheFile, session=session)
File "/home/pi/ProjectAlice/core/voice/model/TTS.py", line 145, in _speak
duration = round(len(AudioSegment.from_file(file)) / 1000, 2)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/pydub/audio_segment.py", line 610, in from_file
file = _fd_or_path_or_tempfile(file, 'rb', tempfile=False)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/pydub/utils.py", line 61, in _fd_or_path_or_tempfile
fd = open(fd, mode=mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/ProjectAlice/var/cache/pico/en-US/male/en-US/3f5a69d11cf84902cb0d83ae5a552ebe.wav'
Note that earlier it did comment:
Starting TTSManager
[TTSManager] Started "pico" TTS
[TTS] Voice "en-us" not found, falling back to "en-US"
Since doing update of alpha2 a couple days ago, I notice the cheery "yes" has disappeared. There are no errors in snips-watch or logs, it is as if turned off. The feedback is definitely needed in a voice environment
Though Snips is not yet available on every OS, our code should be os indenpendent.
Meaning path using a concatenation style: '{}/{}/{}'.format(foo, bar, baz) is a big no. Instead use os.path.join(foo, bar, baz) or better yet, Python 3 Path objects
Other exemples are os.path.join('/tmp', 'myfile.ext'), that's a no too! Instead use os.path.join(tempfile.gettempdir(), 'myfile.ext)
Other exemples if needed, but I think we got the idea
(venv) pi@raspberrypi:~/ProjectAlice $ ./alice module:intent:list Speedtest
Traceback (most recent call last):
File "/home/pi/ProjectAlice/ProjectAliceConsole.py", line 4, in <module>
Application().run(ArgvInput())
File "/home/pi/ProjectAlice/core/console/Application.py", line 25, in run
self.registerCommands()
File "/home/pi/ProjectAlice/core/console/Application.py", line 46, in registerCommands
self.add(ModuleIntentListCommand())
File "/home/pi/ProjectAlice/core/console/command/ModuleIntentListCommand.py", line 29, in __init__
languageFilter=superManager.languageManager.activeLanguage
File "/home/pi/ProjectAlice/core/snips/SamkillaManager.py", line 343, in getDialogTemplatesMaps
return self._mainProcessor.buildMapsFromDialogTemplates(runOnAssistantId, languageFilter=languageFilter, moduleFilter=moduleFilter)
AttributeError: 'NoneType' object has no attribute 'buildMapsFromDialogTemplates'
in the Module DateTimeYear currently the function localize is used for the translation of some strings. However the strings are in the system strings.json while localize accesses the system wide talk files.
So the modules should probably use getTranslation for these translations. Another issue here is that these string.json files do not include weekday translations even though they are used by the module.
What is the localize function even supposed to do? When is it required to translate a talk sentence (where the language is not already clear in front -> you can use the normal randomTalk). Maybe a small comment in the code would help clearing this up
just started recording my hotword, however it failed. So Alice asked me whether she should try to fix it
[15:11:22] [Tts] was asked to say "Something went wrong capturing the wakeword. Do you want me to try to fix the problem and retry?"
I said yes. Afterwards she told me to say the hotword. I did that, however the recording of alice did not include the "hey alice" I said, but the "yes" I did say in the previous sentence.
Another issue is that sometimes the hotword recording is bad because there was some noise after saying the hotword. Then it does not manage to cut the hotword correctly even after telling it to cut more multiple times. It would be cool not to only have the options "yes" "more" "less", but the option to discard the recording and record a new one aswell
ideas:
Add user, password and SSL support for mqtt
I removed my local assistant file that was generated in var/assistants/en/pro_*
then synced it again using SamKilla. This caused every intent to be created a second time in the console
Hi!
After playing around with the initial implementation of my module I wanted to extend the dialogTemplates. I discovered a bug where not only changes to the JSON files would not be uploaded to the Snips Console, but even deleting the intents or the app in the Console wouldn't solve the problem. alice sync assistant
says that no changes detected during sync and the refreshing the Snips Console doesn't show them either.
It seems that the cause is the data stored in var/assistant. Removing the proj_... directory, made alice sync assistant
upload the all intents. While it warns about duplicate intents, the changes are uploaded correctly.
However, this leads to another issue (it should be probably a separate issue): the slots types ("My Slot Types"), the skills ("My Apps") and are uploaded multiple times and added to the same assistant (e.g. My ProjectAlice_en assistant has now 3 AliceCore skills).
Uninstalling a module is required!
Starting TTSManager
An unhandled exception occured
An unhandled exception occured
- Traceback: Traceback (most recent call last):
File "main.py", line 89, in <module>
main()
File "main.py", line 75, in main
projectAlice = ProjectAlice()
File "/home/pi/ProjectAlice/core/ProjectAlice.py", line 21, in __init__
self._superManager.onStart()
File "/home/pi/ProjectAlice/core/base/SuperManager.py", line 81, in onStart
samkillaManager.onStart()
File "/home/pi/ProjectAlice/core/snips/SamkillaManager.py", line 60, in onStart
self._loadDialogTemplateMapsInConfigManager()
File "/home/pi/ProjectAlice/core/snips/SamkillaManager.py", line 70, in _loadDialogTemplateMapsInConfigManager
languageFilter=self.LanguageManager.activeLanguage
File "/home/pi/ProjectAlice/core/snips/SamkillaManager.py", line 340, in getDialogTemplatesMaps
return self._mainProcessor.buildMapsFromDialogTemplates(runOnAssistantId, languageFilter=languageFilter, moduleFilter=moduleFilter)
File "/home/pi/ProjectAlice/core/snips/samkilla/processors/MainProcessor.py", line 327, in buildMapsFromDialogTemplates
module = self.getModuleFromFile(moduleFile=languageFile, moduleLanguage=language)
File "/home/pi/ProjectAlice/core/snips/samkilla/processors/MainProcessor.py", line 156, in getModuleFromFile
if module['module'] not in self._modules:
KeyError: 'module'
This happens if the dialogTemplate.json has only "{}" or is empty
- Traceback: Traceback (most recent call last):
File "main.py", line 90, in <module>
main()
File "main.py", line 76, in main
projectAlice = ProjectAlice()
File "/home/pi/ProjectAlice/core/ProjectAlice.py", line 17, in __init__
self._superManager.onStart()
File "/home/pi/ProjectAlice/core/base/SuperManager.py", line 80, in onStart
talkManager.onStart()
File "/home/pi/ProjectAlice/core/voice/TalkManager.py", line 25, in onStart
self.loadTalks()
File "/home/pi/ProjectAlice/core/voice/TalkManager.py", line 46, in loadTalks
for langTalkFile in langTalksMountpoint.iterdir():
File "/usr/local/lib/python3.7/pathlib.py", line 1090, in iterdir
for name in self._accessor.listdir(self):
FileNotFoundError: [Errno 2] No such file or directory: 'modules/AliceCore/talks'
Turning off a module should deactivate its intents and make sure it is never called
[Tts] was asked to say "Ok, will do! Note that it might take a while!"
[Tts] was asked to say "Ok, will do! Note that it might take a while!"
Hi!
After installing Alice, it tries to talk to me on a siteId called default, which I don't have
[23:04:46] [Dialogue] was asked to start a session on site default
[23:04:46] [Dialogue] session with id 'cc88aaf5-020b-4526-82a1-319380b0d5c5' was started on site default
[23:04:46] [Tts] was asked to say "Welcome to Project Alice! There seems to be no user defined yet, let's do this! Please, tell me your name."
[23:05:10] [Dialogue] session with id 'cc88aaf5-020b-4526-82a1-319380b0d5c5' was ended on site default. The session timed out because the Audio Server component did not respond in a timely manner. Please ensure that the snips audio server is started and running correctly.
Where can I change the site id that Alice uses on start?
Additionally, the site id is asked in the ProjectAliceInstaller script, but it's only used for the snips.toml config. I guess this should also be used in Alice at some point?
My setup is also probably causing problems, Alice is running on a virtual machine without sound input/output, my site is currently my laptop (called abakus). I could work around and rename it to default, but I would prefer to solve it in Alice.
Samkilla does not detect added slots or intents changes and does not sync them
[ModuleManager] Checking for module updates
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2913, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1578, in loop_forever
rc = self.loop(timeout, max_packets)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1072, in loop
rc = self.loop_read(max_packets)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1374, in loop_read
rc = self._packet_read()
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2071, in _packet_read
rc = self._packet_handle()
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2560, in _packet_handle
return self._handle_publish()
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2759, in _handle_publish
self._handle_on_message(message)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2902, in _handle_on_message
callback(self, self._userdata, message)
File "/home/pi/ProjectAlice/core/server/MqttManager.py", line 273, in onSnipsSessionStarted
SuperManager.getInstance().broadcast(method='onSessionStarted', exceptions=[self.name], args=[session], propagateToModules=True)
File "/home/pi/ProjectAlice/core/base/SuperManager.py", line 181, in broadcast
self._managers['ModuleManager'].broadcast(method=method, args=args)
KeyError: 'ModuleManager'
did work fine again after restarting alice
The core modules need complete translation to EN, FR and DE before alpha. The other modules don't have to be translated just yet
Theses modules are:
Traceback (most recent call last):
File "/home/pi/ProjectAlice/core/server/MqttManager.py", line 179, in onMessage
session.notUnderstood += 1
AttributeError: can't set attribute
None
[MqttManager] Uncaught error in onMessage: can't set attribute
Now that managers is finally gone and SuperManager is behaving nicely and better than before, the console relies on managers too much, it needs a rethink on start
Removing a slot from a dialog template such as deprecated ones or unused ones, crashes Samkilla with the following error:
[Safe] Handle error gracefully
<class 'KeyError'>
Traceback (most recent call last):
File "/home/pi/ProjectAlice/core/snips/samkilla/processors/IntentRemoteProcessor.py", line 107, in syncIntentsOnAssistantSafely
return self.syncIntentsOnAssistant(typeEntityMatching=typeEntityMatching, skillId=skillId, intentSyncState=intentSyncState, hashComputationOnly=hashComputationOnly)
File "/home/pi/ProjectAlice/core/snips/samkilla/processors/IntentRemoteProcessor.py", line 122, in syncIntentsOnAssistant
intentMatching = self.syncIntent(typeEntityMatching, skillId, hashComputationOnly)
File "/home/pi/ProjectAlice/core/snips/samkilla/processors/IntentRemoteProcessor.py", line 82, in syncIntent
language=self._intentLanguage
File "/home/pi/ProjectAlice/core/snips/samkilla/Intent.py", line 226, in edit
structuredSlots, entities = self.formatSlotsAndEntities(typeEntityMatching, slotsDefinition)
File "/home/pi/ProjectAlice/core/snips/samkilla/Intent.py", line 276, in formatSlotsAndEntities
slotEntityId = slot['type'] if snipsSpecialSlot else typeEntityMatching[slot['type']]['entityId']
KeyError: 'More'
Actually we have the choice to sync one or all modules. This is a giant time loss when 3 or 4 modules just updated
when intentOwner is missing in the config (which already happened to me twice), this breaks the intentfilter which is kind of hard to track down for a normal user.
It would be good to throw a exception when it is missing since alice will not work without it, that tells the user that he should add his console user name
Traceback (most recent call last):
File "/home/pi/ProjectAlice/ProjectAliceConsole.py", line 4, in <module>
Application().run(ArgvInput())
File "/home/pi/ProjectAlice/core/console/Application.py", line 25, in run
self.registerCommands()
File "/home/pi/ProjectAlice/core/console/Application.py", line 46, in registerCommands
self.add(ModuleIntentListCommand())
File "/home/pi/ProjectAlice/core/console/command/ModuleIntentListCommand.py", line 33, in __init__
languageManager.onStart()
File "/home/pi/ProjectAlice/core/voice/LanguageManager.py", line 32, in onStart
self._loadSupportedLanguages()
File "/home/pi/ProjectAlice/core/voice/LanguageManager.py", line 91, in _loadSupportedLanguages
activeLangDef: str = self.ConfigManager.getAliceConfigByName('activeLanguage')
File "/home/pi/ProjectAlice/core/base/model/Manager.py", line 97, in ConfigManager
return SuperManager.getInstance().configManager
AttributeError: 'NoneType' object has no attribute 'configManager'
we should add unit tests for alice
[Dialogue] session with id 'fbe2f8ae-3ac4-4b2d-8f6e-eee5f372ebc1' was ended on site default. The session was ended because an error happened: Event not supported: Response { waiting: AudioFinishedPayload }, with response: TtsSayFinished(TtsFinishedPayload)
It's first of september, autumn is coming, it's time to take the dust away
Cleaning up the whole thing is needed. Many details are left everywhere, comments outside methods (useless, one doesn't see them when calling the method, must be in the docstr), usage of double quotes, todos, long time commented out code parts etc etc etc
Sound file /home/pi/ProjectAlice/var/cache/pico/en-us/male/en-us/85bd659209f938ff9aafeb2c9fa666b6.wav doesn't exist
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2913, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1578, in loop_forever
rc = self.loop(timeout, max_packets)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1072, in loop
rc = self.loop_read(max_packets)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 1374, in loop_read
rc = self._packet_read()
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2071, in _packet_read
rc = self._packet_handle()
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2560, in _packet_handle
return self._handle_publish()
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2759, in _handle_publish
self._handle_on_message(message)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/paho/mqtt/client.py", line 2902, in _handle_on_message
callback(self, self._userdata, message)
File "/home/pi/ProjectAlice/core/server/MqttManager.py", line 359, in onSnipsSay
SuperManager.getInstance().broadcast(method='onSay', exceptions=[self.name], args=[session], propagateToModules=True)
File "/home/pi/ProjectAlice/core/base/SuperManager.py", line 176, in broadcast
func(*args)
File "/home/pi/ProjectAlice/core/voice/TTSManager.py", line 94, in onSay
self._tts.onSay(session)
File "/home/pi/ProjectAlice/core/voice/model/PicoTTS.py", line 78, in onSay
self._speak(file=self._cacheFile, session=session)
File "/home/pi/ProjectAlice/core/voice/model/TTS.py", line 146, in _speak
duration = round(len(AudioSegment.from_file(file)) / 1000, 2)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/pydub/audio_segment.py", line 610, in from_file
file = _fd_or_path_or_tempfile(file, 'rb', tempfile=False)
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/pydub/utils.py", line 61, in _fd_or_path_or_tempfile
fd = open(fd, mode=mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/ProjectAlice/var/cache/pico/en-us/male/en-us/85bd659209f938ff9aafeb2c9fa666b6.wav'
She speaks the "welcome.. newuser" message, and accepts a name, then times in snips-watch
Starting Project Alice initializer
Config file found and force rewrite specified, let's restart all this!
Installing audio hardware
An unhandled exception occured
[Safe] Handle error gracefully
<class 'selenium.common.exceptions.TimeoutException'>
Traceback (most recent call last):
File "/home/pi/ProjectAlice/core/snips/samkilla/Intent.py", line 146, in create
response = self._ctx.postGQLBrowserly(gqlRequest)
File "/home/pi/ProjectAlice/core/snips/SamkillaManager.py", line 238, in postGQLBrowserly
raise HttpError(errorResponse['code'], errorResponse['message'], errorResponse['context'])
core.ProjectAliceExceptions.HttpError: {"status":409,"message":{"message":"already exists: intent name CallWakeword","status":"error"}}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/ProjectAlice/core/snips/samkilla/processors/IntentRemoteProcessor.py", line 107, in syncIntentsOnAssistantSafely
return self.syncIntentsOnAssistant(typeEntityMatching=typeEntityMatching, skillId=skillId, intentSyncState=intentSyncState, hashComputationOnly=hashComputationOnly)
File "/home/pi/ProjectAlice/core/snips/samkilla/processors/IntentRemoteProcessor.py", line 122, in syncIntentsOnAssistant
intentMatching = self.syncIntent(typeEntityMatching, skillId, hashComputationOnly)
File "/home/pi/ProjectAlice/core/snips/samkilla/processors/IntentRemoteProcessor.py", line 96, in syncIntent
utterancesDefinition=intent['utterances']
File "/home/pi/ProjectAlice/core/snips/samkilla/Intent.py", line 150, in create
intentDuplicate = self.getIntentByUserIdAndIntentName(userId, name)
File "/home/pi/ProjectAlice/core/snips/samkilla/Intent.py", line 26, in getIntentByUserIdAndIntentName
return self._intentsCache['cacheName'].get(intentName.lower(), self.listIntentsByUserId(userId, intentFilter=intentName, intentFilterAttribute='name'))
File "/home/pi/ProjectAlice/core/snips/samkilla/Intent.py", line 44, in listIntentsByUserId
response = self._ctx.postGQLBrowserly(gqlRequest)
File "/home/pi/ProjectAlice/core/snips/SamkillaManager.py", line 215, in postGQLBrowserly
wait.until(EC.title_contains('{'))
File "/home/pi/ProjectAlice/venv/lib/python3.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
While usually pico tts is already not really awesome it has some serious issues with punctuation.
e.g.
"<s>I need 1 more.</s><s>Call me again by saying <break time="100ms"/> "Hey Alice" <break time="150ms"/></s>"
was just spoken as
I need 1 more dot
same happens sometimes with exclamation marks. The only idea I have right now would be to remove the punctuation in pico tts, but thats not really a good idea for all the cases where this does not happen
Following our guidelines is needed
[LanguageManager] No active snips project id set
Starting ASRManager
[SnipsServicesManager] Assistant not yet existing, shouldn't handle Snips for now
[ASRManager] Started Snips ASR
Starting TTSManager
[TTSManager] Started "pico" TTS
[TTS] Lang "en-US" not found, falling back to "en-Us"
An unhandled exception occured
I did try to download my assistant. However it went into a loop of running
[SnipsConsoleManager] Training NLU
thats why I added a debug print to the _req method printing all api calls that are made with their return value
<Response [400]> b'{"message":"bad request: No utterance found for intents []","errorCode":"TRAINING:CREATE:NO-UTTERANCE-FOUND","status":"error"}' /v2/training/assistant/proj_5Kkd5Kn21Gm None {'trainingType': 'nlu'}
<Response [200]> b'{"nluStatus":{"inProgress":false,"needTraining":true},"asrStatus":{"inProgress":false,"needTraining":true},"approximateDownloadSize":18000000}' /v2/training/assistant/proj_5Kkd5Kn21Gm None None
I was thinking about a few points:
What do you guys think?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.