Skip to content

Commit

Permalink
Merge 6feb7e5 into abfbd5e
Browse files Browse the repository at this point in the history
  • Loading branch information
daniego committed Nov 25, 2018
2 parents abfbd5e + 6feb7e5 commit 0b0a658
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kalliope/core/Cortex.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ def save_parameter_from_order_in_memory(cls, order_parameters):
if Utils.is_containing_bracket(value):
# if the key exist in the temp dict we can load it with jinja
value = jinja2.Template(value).render(Cortex.temp)
if value:
Cortex.save(key, value)
order_saved = True
if value:
Cortex.save(key, value)
order_saved = True

return order_saved
5 changes: 5 additions & 0 deletions kalliope/core/OrderAnalyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from kalliope.core.Utils.Utils import Utils
from kalliope.core.ConfigurationManager import SettingLoader

from kalliope.core.Cortex import Cortex

import logging

logging.basicConfig()
Expand Down Expand Up @@ -56,6 +58,9 @@ def get_matching_synapse(cls, order, brain=None):
# create a list of MatchedSynapse from the tuple list
list_synapse_to_process = cls.get_list_synapses_to_process(list_match_synapse)

# save in kalliope memory the last stt order
Cortex.save("kalliope_last_stt_message", order)

return list_synapse_to_process

@classmethod
Expand Down
4 changes: 4 additions & 0 deletions kalliope/neurons/neurotransmitter/neurotransmitter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging

from kalliope.core.NeuronModule import NeuronModule, MissingParameterException, InvalidParameterException
from kalliope.core.Cortex import Cortex

logging.basicConfig()
logger = logging.getLogger("kalliope")
Expand Down Expand Up @@ -59,6 +60,9 @@ def callback(self, audio):
if not found: # the answer do not correspond to any answer. We run the default synapse
self.run_synapse_by_name(self.default, high_priority=True, is_api_call=self.is_api_call)

# save in kalliope memory the last stt order
Cortex.save("kalliope_last_stt_message", audio)

def _is_parameters_ok(self):
"""
Check if received links are ok to perform operations
Expand Down

0 comments on commit 0b0a658

Please sign in to comment.