prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  切换英文语音合成报错 get_input_ids() got an unexpected keyword argument 'get_tone_ids'
  要切换成英文语音合成时，更改了/paddlespeech/server/conf/application.yaml这个配置文件中的tts_python里面的声学模型和声码器，声学模型用的是fastspeech2_ljspeech，声码器用的pwgan_ljspeech，并且lang改为en，但是报错 get_input_ids() got an unexpected keyword argument 'get_tone_ids'
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `paddlespeech/server/engine/engine_warmup.py`
  Content:
  ```
  1 # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #     http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 import time
  15 
  16 from paddlespeech.cli.log import logger
  17 from paddlespeech.server.engine.engine_pool import get_engine_pool
  18 
  19 
  20 def warm_up(engine_and_type: str, warm_up_time: int=3) -> bool:
  21     engine_pool = get_engine_pool()
  22 
  23     if "tts" in engine_and_type:
  24         tts_engine = engine_pool['tts']
  25         flag_online = False
  26         if tts_engine.lang == 'zh':
  27             sentence = "您好，欢迎使用语音合成服务。"
  28         elif tts_engine.lang == 'en':
  29             sentence = "Hello and welcome to the speech synthesis service."
  30         else:
  31             logger.error("tts engine only support lang: zh or en.")
  32             sys.exit(-1)
  33 
  34         if engine_and_type == "tts_python":
  35             from paddlespeech.server.engine.tts.python.tts_engine import PaddleTTSConnectionHandler
  36         elif engine_and_type == "tts_inference":
  37             from paddlespeech.server.engine.tts.paddleinference.tts_engine import PaddleTTSConnectionHandler
  38         elif engine_and_type == "tts_online":
  39             from paddlespeech.server.engine.tts.online.python.tts_engine import PaddleTTSConnectionHandler
  40             flag_online = True
  41         elif engine_and_type == "tts_online-onnx":
  42             from paddlespeech.server.engine.tts.online.onnx.tts_engine import PaddleTTSConnectionHandler
  43             flag_online = True
  44         else:
  45             logger.error("Please check tte engine type.")
  46 
  47         try:
  48             logger.debug("Start to warm up tts engine.")
  49             for i in range(warm_up_time):
  50                 connection_handler = PaddleTTSConnectionHandler(tts_engine)
  51                 if flag_online:
  52                     for wav in connection_handler.infer(
  53                             text=sentence,
  54                             lang=tts_engine.lang,
  55                             am=tts_engine.config.am):
  56                         logger.debug(
  57                             f"The first response time of the {i} warm up: {connection_handler.first_response_time} s"
  58                         )
  59                         break
  60 
  61                 else:
  62                     st = time.time()
  63                     connection_handler.infer(text=sentence)
  64                     et = time.time()
  65                     logger.debug(
  66                         f"The response time of the {i} warm up: {et - st} s")
  67         except Exception as e:
  68             logger.error("Failed to warm up on tts engine.")
  69             logger.error(e)
  70             return False
  71 
  72     else:
  73         pass
  74 
  75     return True
  76
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/paddlespeech/server/engine/engine_warmup.py b/paddlespeech/server/engine/engine_warmup.py
  --- a/paddlespeech/server/engine/engine_warmup.py
  +++ b/paddlespeech/server/engine/engine_warmup.py
  @@ -60,7 +60,10 @@
   
                   else:
                       st = time.time()
  -                    connection_handler.infer(text=sentence)
  +                    connection_handler.infer(
  +                        text=sentence,
  +                        lang=tts_engine.lang,
  +                        am=tts_engine.config.am)
                       et = time.time()
                       logger.debug(
                           f"The response time of the {i} warm up: {et - st} s")
  
verification_info: {"golden_diff": "diff --git a/paddlespeech/server/engine/engine_warmup.py b/paddlespeech/server/engine/engine_warmup.py\n--- a/paddlespeech/server/engine/engine_warmup.py\n+++ b/paddlespeech/server/engine/engine_warmup.py\n@@ -60,7 +60,10 @@\n \n                 else:\n                     st = time.time()\n-                    connection_handler.infer(text=sentence)\n+                    connection_handler.infer(\n+                        text=sentence,\n+                        lang=tts_engine.lang,\n+                        am=tts_engine.config.am)\n                     et = time.time()\n                     logger.debug(\n                         f\"The response time of the {i} warm up: {et - st} s\")\n", "issue": "\u5207\u6362\u82f1\u6587\u8bed\u97f3\u5408\u6210\u62a5\u9519 get_input_ids() got an unexpected keyword argument 'get_tone_ids'\n\u8981\u5207\u6362\u6210\u82f1\u6587\u8bed\u97f3\u5408\u6210\u65f6\uff0c\u66f4\u6539\u4e86/paddlespeech/server/conf/application.yaml\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684tts_python\u91cc\u9762\u7684\u58f0\u5b66\u6a21\u578b\u548c\u58f0\u7801\u5668\uff0c\u58f0\u5b66\u6a21\u578b\u7528\u7684\u662ffastspeech2_ljspeech\uff0c\u58f0\u7801\u5668\u7528\u7684pwgan_ljspeech\uff0c\u5e76\u4e14lang\u6539\u4e3aen\uff0c\u4f46\u662f\u62a5\u9519 get_input_ids() got an unexpected keyword argument 'get_tone_ids'\n", "before_files": [{"content": "# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nimport time\n\nfrom paddlespeech.cli.log import logger\nfrom paddlespeech.server.engine.engine_pool import get_engine_pool\n\n\ndef warm_up(engine_and_type: str, warm_up_time: int=3) -> bool:\n    engine_pool = get_engine_pool()\n\n    if \"tts\" in engine_and_type:\n        tts_engine = engine_pool['tts']\n        flag_online = False\n        if tts_engine.lang == 'zh':\n            sentence = \"\u60a8\u597d\uff0c\u6b22\u8fce\u4f7f\u7528\u8bed\u97f3\u5408\u6210\u670d\u52a1\u3002\"\n        elif tts_engine.lang == 'en':\n            sentence = \"Hello and welcome to the speech synthesis service.\"\n        else:\n            logger.error(\"tts engine only support lang: zh or en.\")\n            sys.exit(-1)\n\n        if engine_and_type == \"tts_python\":\n            from paddlespeech.server.engine.tts.python.tts_engine import PaddleTTSConnectionHandler\n        elif engine_and_type == \"tts_inference\":\n            from paddlespeech.server.engine.tts.paddleinference.tts_engine import PaddleTTSConnectionHandler\n        elif engine_and_type == \"tts_online\":\n            from paddlespeech.server.engine.tts.online.python.tts_engine import PaddleTTSConnectionHandler\n            flag_online = True\n        elif engine_and_type == \"tts_online-onnx\":\n            from paddlespeech.server.engine.tts.online.onnx.tts_engine import PaddleTTSConnectionHandler\n            flag_online = True\n        else:\n            logger.error(\"Please check tte engine type.\")\n\n        try:\n            logger.debug(\"Start to warm up tts engine.\")\n            for i in range(warm_up_time):\n                connection_handler = PaddleTTSConnectionHandler(tts_engine)\n                if flag_online:\n                    for wav in connection_handler.infer(\n                            text=sentence,\n                            lang=tts_engine.lang,\n                            am=tts_engine.config.am):\n                        logger.debug(\n                            f\"The first response time of the {i} warm up: {connection_handler.first_response_time} s\"\n                        )\n                        break\n\n                else:\n                    st = time.time()\n                    connection_handler.infer(text=sentence)\n                    et = time.time()\n                    logger.debug(\n                        f\"The response time of the {i} warm up: {et - st} s\")\n        except Exception as e:\n            logger.error(\"Failed to warm up on tts engine.\")\n            logger.error(e)\n            return False\n\n    else:\n        pass\n\n    return True\n", "path": "paddlespeech/server/engine/engine_warmup.py"}], "after_files": [{"content": "# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nimport time\n\nfrom paddlespeech.cli.log import logger\nfrom paddlespeech.server.engine.engine_pool import get_engine_pool\n\n\ndef warm_up(engine_and_type: str, warm_up_time: int=3) -> bool:\n    engine_pool = get_engine_pool()\n\n    if \"tts\" in engine_and_type:\n        tts_engine = engine_pool['tts']\n        flag_online = False\n        if tts_engine.lang == 'zh':\n            sentence = \"\u60a8\u597d\uff0c\u6b22\u8fce\u4f7f\u7528\u8bed\u97f3\u5408\u6210\u670d\u52a1\u3002\"\n        elif tts_engine.lang == 'en':\n            sentence = \"Hello and welcome to the speech synthesis service.\"\n        else:\n            logger.error(\"tts engine only support lang: zh or en.\")\n            sys.exit(-1)\n\n        if engine_and_type == \"tts_python\":\n            from paddlespeech.server.engine.tts.python.tts_engine import PaddleTTSConnectionHandler\n        elif engine_and_type == \"tts_inference\":\n            from paddlespeech.server.engine.tts.paddleinference.tts_engine import PaddleTTSConnectionHandler\n        elif engine_and_type == \"tts_online\":\n            from paddlespeech.server.engine.tts.online.python.tts_engine import PaddleTTSConnectionHandler\n            flag_online = True\n        elif engine_and_type == \"tts_online-onnx\":\n            from paddlespeech.server.engine.tts.online.onnx.tts_engine import PaddleTTSConnectionHandler\n            flag_online = True\n        else:\n            logger.error(\"Please check tte engine type.\")\n\n        try:\n            logger.debug(\"Start to warm up tts engine.\")\n            for i in range(warm_up_time):\n                connection_handler = PaddleTTSConnectionHandler(tts_engine)\n                if flag_online:\n                    for wav in connection_handler.infer(\n                            text=sentence,\n                            lang=tts_engine.lang,\n                            am=tts_engine.config.am):\n                        logger.debug(\n                            f\"The first response time of the {i} warm up: {connection_handler.first_response_time} s\"\n                        )\n                        break\n\n                else:\n                    st = time.time()\n                    connection_handler.infer(\n                        text=sentence,\n                        lang=tts_engine.lang,\n                        am=tts_engine.config.am)\n                    et = time.time()\n                    logger.debug(\n                        f\"The response time of the {i} warm up: {et - st} s\")\n        except Exception as e:\n            logger.error(\"Failed to warm up on tts engine.\")\n            logger.error(e)\n            return False\n\n    else:\n        pass\n\n    return True\n", "path": "paddlespeech/server/engine/engine_warmup.py"}]}