prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Typing error in recognize_google() methode
  In mycroft/stt/\_\_init\_\_.py line 74 :
  Replacing mistyped 's' parameter by self.lang fixed the problem.
  
  </issue>
  <code>
  [start of mycroft/stt/__init__.py]
  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 from abc import ABCMeta, abstractmethod
  18 
  19 from speech_recognition import Recognizer
  20 
  21 from mycroft.api import STTApi
  22 from mycroft.configuration import ConfigurationManager
  23 from mycroft.util.log import getLogger
  24 
  25 __author__ = "jdorleans"
  26 
  27 LOG = getLogger("STT")
  28 
  29 
  30 class STT(object):
  31     __metaclass__ = ABCMeta
  32 
  33     def __init__(self):
  34         config_core = ConfigurationManager.get()
  35         self.lang = str(self.init_language(config_core))
  36         config_stt = config_core.get("stt", {})
  37         self.config = config_stt.get(config_stt.get("module"), {})
  38         self.credential = self.config.get("credential", {})
  39         self.recognizer = Recognizer()
  40 
  41     @staticmethod
  42     def init_language(config_core):
  43         langs = config_core.get("lang", "en-US").split("-")
  44         return langs[0].lower() + "-" + langs[1].upper()
  45 
  46     @abstractmethod
  47     def execute(self, audio, language=None):
  48         pass
  49 
  50 
  51 class TokenSTT(STT):
  52     __metaclass__ = ABCMeta
  53 
  54     def __init__(self):
  55         super(TokenSTT, self).__init__()
  56         self.token = str(self.credential.get("token"))
  57 
  58 
  59 class BasicSTT(STT):
  60     __metaclass__ = ABCMeta
  61 
  62     def __init__(self):
  63         super(BasicSTT, self).__init__()
  64         self.username = str(self.credential.get("username"))
  65         self.password = str(self.credential.get("password"))
  66 
  67 
  68 class GoogleSTT(TokenSTT):
  69     def __init__(self):
  70         super(GoogleSTT, self).__init__()
  71 
  72     def execute(self, audio, language=None):
  73         self.lang = language or self.lang
  74         return self.recognizer.recognize_google(audio, self.token, s)
  75 
  76 
  77 class WITSTT(TokenSTT):
  78     def __init__(self):
  79         super(WITSTT, self).__init__()
  80 
  81     def execute(self, audio, language=None):
  82         LOG.warn("WITSTT language should be configured at wit.ai settings.")
  83         return self.recognizer.recognize_wit(audio, self.token)
  84 
  85 
  86 class IBMSTT(BasicSTT):
  87     def __init__(self):
  88         super(IBMSTT, self).__init__()
  89 
  90     def execute(self, audio, language=None):
  91         self.lang = language or self.lang
  92         return self.recognizer.recognize_ibm(audio, self.username,
  93                                              self.password, self.lang)
  94 
  95 
  96 class MycroftSTT(STT):
  97     def __init__(self):
  98         super(MycroftSTT, self).__init__()
  99         self.api = STTApi()
  100 
  101     def execute(self, audio, language=None):
  102         self.lang = language or self.lang
  103         return self.api.stt(audio.get_flac_data(), self.lang, 1)[0]
  104 
  105 
  106 class STTFactory(object):
  107     CLASSES = {
  108         "mycroft": MycroftSTT,
  109         "google": GoogleSTT,
  110         "wit": WITSTT,
  111         "ibm": IBMSTT
  112     }
  113 
  114     @staticmethod
  115     def create():
  116         config = ConfigurationManager.get().get("stt", {})
  117         module = config.get("module", "mycroft")
  118         clazz = STTFactory.CLASSES.get(module)
  119         return clazz()
  120
  [end of mycroft/stt/__init__.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/mycroft/stt/__init__.py b/mycroft/stt/__init__.py
  --- a/mycroft/stt/__init__.py
  +++ b/mycroft/stt/__init__.py
  @@ -71,7 +71,7 @@
   
       def execute(self, audio, language=None):
           self.lang = language or self.lang
  -        return self.recognizer.recognize_google(audio, self.token, s)
  +        return self.recognizer.recognize_google(audio, self.token, self.lang)
   
   
   class WITSTT(TokenSTT):
  
verification_info: {"golden_diff": "diff --git a/mycroft/stt/__init__.py b/mycroft/stt/__init__.py\n--- a/mycroft/stt/__init__.py\n+++ b/mycroft/stt/__init__.py\n@@ -71,7 +71,7 @@\n \n     def execute(self, audio, language=None):\n         self.lang = language or self.lang\n-        return self.recognizer.recognize_google(audio, self.token, s)\n+        return self.recognizer.recognize_google(audio, self.token, self.lang)\n \n \n class WITSTT(TokenSTT):\n", "issue": "Typing error in recognize_google() methode\nIn mycroft/stt/\\_\\_init\\_\\_.py line 74 :\r\nReplacing mistyped 's' parameter by self.lang fixed the problem.\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/>.\nfrom abc import ABCMeta, abstractmethod\n\nfrom speech_recognition import Recognizer\n\nfrom mycroft.api import STTApi\nfrom mycroft.configuration import ConfigurationManager\nfrom mycroft.util.log import getLogger\n\n__author__ = \"jdorleans\"\n\nLOG = getLogger(\"STT\")\n\n\nclass STT(object):\n    __metaclass__ = ABCMeta\n\n    def __init__(self):\n        config_core = ConfigurationManager.get()\n        self.lang = str(self.init_language(config_core))\n        config_stt = config_core.get(\"stt\", {})\n        self.config = config_stt.get(config_stt.get(\"module\"), {})\n        self.credential = self.config.get(\"credential\", {})\n        self.recognizer = Recognizer()\n\n    @staticmethod\n    def init_language(config_core):\n        langs = config_core.get(\"lang\", \"en-US\").split(\"-\")\n        return langs[0].lower() + \"-\" + langs[1].upper()\n\n    @abstractmethod\n    def execute(self, audio, language=None):\n        pass\n\n\nclass TokenSTT(STT):\n    __metaclass__ = ABCMeta\n\n    def __init__(self):\n        super(TokenSTT, self).__init__()\n        self.token = str(self.credential.get(\"token\"))\n\n\nclass BasicSTT(STT):\n    __metaclass__ = ABCMeta\n\n    def __init__(self):\n        super(BasicSTT, self).__init__()\n        self.username = str(self.credential.get(\"username\"))\n        self.password = str(self.credential.get(\"password\"))\n\n\nclass GoogleSTT(TokenSTT):\n    def __init__(self):\n        super(GoogleSTT, self).__init__()\n\n    def execute(self, audio, language=None):\n        self.lang = language or self.lang\n        return self.recognizer.recognize_google(audio, self.token, s)\n\n\nclass WITSTT(TokenSTT):\n    def __init__(self):\n        super(WITSTT, self).__init__()\n\n    def execute(self, audio, language=None):\n        LOG.warn(\"WITSTT language should be configured at wit.ai settings.\")\n        return self.recognizer.recognize_wit(audio, self.token)\n\n\nclass IBMSTT(BasicSTT):\n    def __init__(self):\n        super(IBMSTT, self).__init__()\n\n    def execute(self, audio, language=None):\n        self.lang = language or self.lang\n        return self.recognizer.recognize_ibm(audio, self.username,\n                                             self.password, self.lang)\n\n\nclass MycroftSTT(STT):\n    def __init__(self):\n        super(MycroftSTT, self).__init__()\n        self.api = STTApi()\n\n    def execute(self, audio, language=None):\n        self.lang = language or self.lang\n        return self.api.stt(audio.get_flac_data(), self.lang, 1)[0]\n\n\nclass STTFactory(object):\n    CLASSES = {\n        \"mycroft\": MycroftSTT,\n        \"google\": GoogleSTT,\n        \"wit\": WITSTT,\n        \"ibm\": IBMSTT\n    }\n\n    @staticmethod\n    def create():\n        config = ConfigurationManager.get().get(\"stt\", {})\n        module = config.get(\"module\", \"mycroft\")\n        clazz = STTFactory.CLASSES.get(module)\n        return clazz()\n", "path": "mycroft/stt/__init__.py"}]}