浏览代码

Document the TTS functionality a bit

Clara Hobbs 7 年前
父节点
当前提交
92557c33f9
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 3
    1
      kayleevc/plugins/pluginbase.py
  2. 1
    1
      kayleevc/plugins/simple.py

+ 3
- 1
kayleevc/plugins/pluginbase.py 查看文件

@@ -40,6 +40,8 @@ class PluginBase(GObject.Object):
40 40
         This method must return True if the command was handled by the plugin,
41 41
         and False otherwise.  As soon as it has been determined that the
42 42
         command will be handled, this method must emit a ``processed`` signal
43
-        with ``text`` as its parameter.
43
+        with ``text`` as its parameter.  If the plugin wants to speak some
44
+        words to the user, it can do so by emitting a ``tts`` signal with the
45
+        words to be spoken as its parameter.
44 46
         """
45 47
         return False

+ 1
- 1
kayleevc/plugins/simple.py 查看文件

@@ -24,7 +24,7 @@ class Plugin(PluginBase):
24 24
         self.corpus_strings.add(self.options['phrase'])
25 25
 
26 26
     def recognizer_finished(self, recognizer, text):
27
-        """Print the phrase when it is spoken"""
27
+        """Print and speak the phrase when it is heard"""
28 28
         # Is there a matching command?
29 29
         if text == self.options['phrase']:
30 30
             self.emit('processed', text)

正在加载...
取消
保存