We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Too many false positives when detecting wake word


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mycroft/client/speech/local_recognizer.py`
Content:
```
1 # Copyright 2016 Mycroft AI, Inc.
2 #
3 # This file is part of Mycroft Core.
4 #
5 # Mycroft Core is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # Mycroft Core is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with Mycroft Core.  If not, see <http://www.gnu.org/licenses/>.
17 
18 
19 import time
20 
21 import os
22 from pocketsphinx.pocketsphinx import Decoder
23 
24 __author__ = 'seanfitz, jdorleans'
25 
26 BASEDIR = os.path.dirname(os.path.abspath(__file__))
27 
28 
29 class LocalRecognizer(object):
30     def __init__(self, sample_rate=16000, lang="en-us", key_phrase="mycroft"):
31         self.lang = lang
32         self.key_phrase = key_phrase
33         self.sample_rate = sample_rate
34         self.configure()
35 
36     def configure(self):
37         config = Decoder.default_config()
38         config.set_string('-hmm', os.path.join(BASEDIR, 'model', self.lang,
39                                                'hmm'))
40         config.set_string('-dict', os.path.join(BASEDIR, 'model', self.lang,
41                                                 'mycroft-en-us.dict'))
42         config.set_string('-keyphrase', self.key_phrase)
43         config.set_float('-kws_threshold', float('1e-45'))
44         config.set_float('-samprate', self.sample_rate)
45         config.set_int('-nfft', 2048)
46         config.set_string('-logfn', '/dev/null')
47         self.decoder = Decoder(config)
48 
49     def transcribe(self, byte_data, metrics=None):
50         start = time.time()
51         self.decoder.start_utt()
52         self.decoder.process_raw(byte_data, False, False)
53         self.decoder.end_utt()
54         if metrics:
55             metrics.timer("mycroft.stt.local.time_s", time.time() - start)
56         return self.decoder.hyp()
57 
58     def is_recognized(self, byte_data, metrics):
59         hyp = self.transcribe(byte_data, metrics)
60         return hyp and self.key_phrase in hyp.hypstr.lower()
61 
62     def found_wake_word(self, hypothesis):
63         return hypothesis and self.key_phrase in hypothesis.hypstr.lower()
64
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/mycroft/client/speech/local_recognizer.py b/mycroft/client/speech/local_recognizer.py
--- a/mycroft/client/speech/local_recognizer.py
+++ b/mycroft/client/speech/local_recognizer.py
@@ -27,7 +27,8 @@
 
 
 class LocalRecognizer(object):
-    def __init__(self, sample_rate=16000, lang="en-us", key_phrase="mycroft"):
+    def __init__(self, sample_rate=16000, lang="en-us",
+                 key_phrase="hey mycroft"):
         self.lang = lang
         self.key_phrase = key_phrase
         self.sample_rate = sample_rate
@@ -40,7 +41,7 @@
         config.set_string('-dict', os.path.join(BASEDIR, 'model', self.lang,
                                                 'mycroft-en-us.dict'))
         config.set_string('-keyphrase', self.key_phrase)
-        config.set_float('-kws_threshold', float('1e-45'))
+        config.set_float('-kws_threshold', float('1e-90'))
         config.set_float('-samprate', self.sample_rate)
         config.set_int('-nfft', 2048)
         config.set_string('-logfn', '/dev/null')

{"golden_diff": "diff --git a/mycroft/client/speech/local_recognizer.py b/mycroft/client/speech/local_recognizer.py\n--- a/mycroft/client/speech/local_recognizer.py\n+++ b/mycroft/client/speech/local_recognizer.py\n@@ -27,7 +27,8 @@\n \n \n class LocalRecognizer(object):\n-    def __init__(self, sample_rate=16000, lang=\"en-us\", key_phrase=\"mycroft\"):\n+    def __init__(self, sample_rate=16000, lang=\"en-us\",\n+                 key_phrase=\"hey mycroft\"):\n         self.lang = lang\n         self.key_phrase = key_phrase\n         self.sample_rate = sample_rate\n@@ -40,7 +41,7 @@\n         config.set_string('-dict', os.path.join(BASEDIR, 'model', self.lang,\n                                                 'mycroft-en-us.dict'))\n         config.set_string('-keyphrase', self.key_phrase)\n-        config.set_float('-kws_threshold', float('1e-45'))\n+        config.set_float('-kws_threshold', float('1e-90'))\n         config.set_float('-samprate', self.sample_rate)\n         config.set_int('-nfft', 2048)\n         config.set_string('-logfn', '/dev/null')\n", "issue": "Too many false positives when detecting wake word\n\n", "before_files": [{"content": "# Copyright 2016 Mycroft AI, Inc.\n#\n# This file is part of Mycroft Core.\n#\n# Mycroft Core is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# Mycroft Core is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with Mycroft Core.  If not, see <http://www.gnu.org/licenses/>.\n\n\nimport time\n\nimport os\nfrom pocketsphinx.pocketsphinx import Decoder\n\n__author__ = 'seanfitz, jdorleans'\n\nBASEDIR = os.path.dirname(os.path.abspath(__file__))\n\n\nclass LocalRecognizer(object):\n    def __init__(self, sample_rate=16000, lang=\"en-us\", key_phrase=\"mycroft\"):\n        self.lang = lang\n        self.key_phrase = key_phrase\n        self.sample_rate = sample_rate\n        self.configure()\n\n    def configure(self):\n        config = Decoder.default_config()\n        config.set_string('-hmm', os.path.join(BASEDIR, 'model', self.lang,\n                                               'hmm'))\n        config.set_string('-dict', os.path.join(BASEDIR, 'model', self.lang,\n                                                'mycroft-en-us.dict'))\n        config.set_string('-keyphrase', self.key_phrase)\n        config.set_float('-kws_threshold', float('1e-45'))\n        config.set_float('-samprate', self.sample_rate)\n        config.set_int('-nfft', 2048)\n        config.set_string('-logfn', '/dev/null')\n        self.decoder = Decoder(config)\n\n    def transcribe(self, byte_data, metrics=None):\n        start = time.time()\n        self.decoder.start_utt()\n        self.decoder.process_raw(byte_data, False, False)\n        self.decoder.end_utt()\n        if metrics:\n            metrics.timer(\"mycroft.stt.local.time_s\", time.time() - start)\n        return self.decoder.hyp()\n\n    def is_recognized(self, byte_data, metrics):\n        hyp = self.transcribe(byte_data, metrics)\n        return hyp and self.key_phrase in hyp.hypstr.lower()\n\n    def found_wake_word(self, hypothesis):\n        return hypothesis and self.key_phrase in hypothesis.hypstr.lower()\n", "path": "mycroft/client/speech/local_recognizer.py"}], "after_files": [{"content": "# Copyright 2016 Mycroft AI, Inc.\n#\n# This file is part of Mycroft Core.\n#\n# Mycroft Core is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# Mycroft Core is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with Mycroft Core.  If not, see <http://www.gnu.org/licenses/>.\n\n\nimport time\n\nimport os\nfrom pocketsphinx.pocketsphinx import Decoder\n\n__author__ = 'seanfitz, jdorleans'\n\nBASEDIR = os.path.dirname(os.path.abspath(__file__))\n\n\nclass LocalRecognizer(object):\n    def __init__(self, sample_rate=16000, lang=\"en-us\",\n                 key_phrase=\"hey mycroft\"):\n        self.lang = lang\n        self.key_phrase = key_phrase\n        self.sample_rate = sample_rate\n        self.configure()\n\n    def configure(self):\n        config = Decoder.default_config()\n        config.set_string('-hmm', os.path.join(BASEDIR, 'model', self.lang,\n                                               'hmm'))\n        config.set_string('-dict', os.path.join(BASEDIR, 'model', self.lang,\n                                                'mycroft-en-us.dict'))\n        config.set_string('-keyphrase', self.key_phrase)\n        config.set_float('-kws_threshold', float('1e-90'))\n        config.set_float('-samprate', self.sample_rate)\n        config.set_int('-nfft', 2048)\n        config.set_string('-logfn', '/dev/null')\n        self.decoder = Decoder(config)\n\n    def transcribe(self, byte_data, metrics=None):\n        start = time.time()\n        self.decoder.start_utt()\n        self.decoder.process_raw(byte_data, False, False)\n        self.decoder.end_utt()\n        if metrics:\n            metrics.timer(\"mycroft.stt.local.time_s\", time.time() - start)\n        return self.decoder.hyp()\n\n    def is_recognized(self, byte_data, metrics):\n        hyp = self.transcribe(byte_data, metrics)\n        return hyp and self.key_phrase in hyp.hypstr.lower()\n\n    def found_wake_word(self, hypothesis):\n        return hypothesis and self.key_phrase in hypothesis.hypstr.lower()\n", "path": "mycroft/client/speech/local_recognizer.py"}]}