Giter Club home page Giter Club logo

projectalice's People

Contributors

chrisb85 avatar dependabot[bot] avatar fix-it-felix-jr avatar hipitihop avatar jeffcdev avatar jr-k avatar lazzaau avatar maxbachmann avatar philipp2310 avatar projectalicebot avatar psychokiller1888 avatar scottwedge avatar vicvega83 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

projectalice's Issues

invalid subscription filter

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.

Wiki documentation

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

Startup, capturing for wake word

[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'

New user

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.

widgets improvement ideas

Ideas:

  • widgets can already be stacked inside each other and be aligned to another module. It might be useful to be able to move the "parent" widget and keept the positioning of the "child" widgets
  • the add/remove buttons in the top right corner should not block the complete top bar from moving widgets into there

Summary of startup

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

Starting ModuleManager shows complaints

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'

Error while sending POST request:

[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

Exception while recording wakeword

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!

Telemetry module fails install

[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)

Sound file .wav doesn't exist, but yes, it really does

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"

Wake word acknowledgement "yes?"

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

OS independence

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

samkilla crash called by cli

(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'

localize vs getTranslation

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

recording of hotword

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

store ideas

ideas:

  • when installing a module a visual feedback like a progress bar would be helpful to show the user that something is happening, because right now he clicks the button and has to wait a while until alice reacts by starting to speak, which can take a couple seconds
  • right now after installing a module it is not added to installed modules/removed from store (done after restarting alice only), which should happen directly after installing it

snips console duplicates

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

Changes in dialogTemplate are not synced to Snips 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

Uninstalling a module is required!

  • Removes the settings in config.py
  • Removes the files in modules/
  • Removes the entries in samkilla
  • Removes the skill/intents/slots from the assistant
  • Syncs/trains/downloads/install the assistant

Does not accept previous config.py from a functional Alice

Starting TTSManager
An unhandled exception occured

  • Traceback: Traceback (most recent call last):
    File "main.py", line 89, in
    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 75, in onStart
    manager.onStart()
    File "/home/pi/ProjectAlice/core/voice/TTSManager.py", line 28, in onStart
    if (SuperManager.getInstance().configManager.getAliceConfigByName('stayCompletlyOffline') or SuperManager.getInstance().configManager.getAliceConfigByName('keepTTSOffline')) and self._tts.online:
    AttributeError: 'NoneType' object has no attribute 'online'

Empty dialogTemplate = crash

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

An unhandled exception occured, Alice fails to run

- 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'

Module deactivation

Turning off a module should deactivate its intents and make sure it is never called

Double talk when asked to update

[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!"

Default site without audio

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.

no ModuleManager

[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

Translation

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:

  • AliceCore
  • AliceSatellite
  • ContextSensitive
  • Customisation
  • DateDayTimeYear
  • RedQueen

can't set attribute

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

Console evolution

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

Slots removal crashes samkilla

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'

Batch sync for samkilla

Actually we have the choice to sync one or all modules. This is a giant time loss when 3 or 4 modules just updated

intentOwner missing

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

./alice -h fails

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'

snips-watch -vvv Caused by previous issue?

[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)

Autumn cleanup

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

No such file or directory, and it doesn't

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

Using the projectalice.yaml causes errors

Starting Project Alice initializer
Config file found and force rewrite specified, let's restart all this!
Installing audio hardware
An unhandled exception occured

  • Traceback: Traceback (most recent call last):
    File "main.py", line 89, in
    main()
    File "main.py", line 74, in main
    Initializer().initProjectAlice()
    File "/home/pi/ProjectAlice/core/Initializer.py", line 206, in initProjectAlice
    importlib.reload(config)
    File "/home/pi/ProjectAlice/venv/lib/python3.7/importlib/init.py", line 169, in reload
    _bootstrap._exec(spec, module)
    File "", line 630, in _exec
    File "", line 728, in exec_module
    File "", line 219, in _call_with_frames_removed
    File "/home/pi/ProjectAlice/config.py", line 6, in
    "awsAccessKey": null,
    NameError: name 'null' is not defined

Install fails toward end of assistant build

[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: 

pico tts with punctuation

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

Always fails at this point, onStart

[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

  • Traceback: Traceback (most recent call last):
    File "main.py", line 89, in
    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 77, in onStart
    manager.onStart()
    File "/home/pi/ProjectAlice/core/voice/TTSManager.py", line 35, in onStart
    self._tts.onStart()
    File "/home/pi/ProjectAlice/core/voice/model/TTS.py", line 53, in onStart
    if self._type not in self._supportedLangAndVoices[self._lang]:
    KeyError: 'en-US'

download using api fails

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

Interface for devs

I was thinking about a few points:

  • Adding an option to config for the interface: "enableDevConsole: False"
  • This unlocks a new section on the interface, for devs
    • It hosts our own "Project Alice" console, were devs can mod their modules, a shameless clone of snips console, but local!
    • It allows one to upload a module directly into Alice, usefull
    • It allows new module direct creation
    • It allows direct PR to the module repository

What do you guys think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.