提交 76391275 编写于 作者: L lym0302

move dir, test=doc

上级 79c064fe
# PaddleSpeech Server
## The environment variables
The path.sh contains the environment variable.
```bash
source ./bin/path.sh
```
## Add engine_backend on conf/application.yaml
```
engine_backend:
asr: 'conf/asr/asr.yaml'
[server name]: [conf yaml file]
```
Currently supporting asr and tts services.
## Start service(command line todo)
```bash
python ./bin/main.py
```
## Client access
Refer to `../tests`
......@@ -12,13 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import argparse
import uvicorn
import yaml
from engine.engine_factory import EngineFactory
from fastapi import FastAPI
from restful.api import setup_router
from engine.engine_factory import EngineFactory
from restful.api import setup_router
from utils.config import get_config
from utils.log import logger
......
export MAIN_ROOT=`realpath ${PWD}/../`
export PYTHONIOENCODING=UTF-8
export PYTHONPATH=${MAIN_ROOT}:${PYTHONPATH}
......@@ -12,6 +12,6 @@ port: 8090
# add engine type (Options: asr, tts) and config file here.
engine_backend:
asr: 'conf/asr/asr.yaml'
#asr: 'conf/asr/asr.yaml'
tts: 'conf/tts/tts.yaml'
......@@ -339,7 +339,7 @@ class TTSEngine(BaseEngine):
"""
super(TTSEngine, self).__init__()
def init(self, config_file: str):
def init(self, config_file: str) -> bool:
self.executor = TTSServerExecutor()
self.config_file = config_file
self.config = get_config(config_file)
......@@ -361,6 +361,7 @@ class TTSEngine(BaseEngine):
voc_predictor_conf=self.config.voc_predictor_conf, )
logger.info("Initialize TTS server engine successfully.")
return True
def postprocess(self,
wav,
......
......@@ -48,7 +48,7 @@ class TTSEngine(BaseEngine):
"""
super(TTSEngine, self).__init__()
def init(self, config_file: str):
def init(self, config_file: str) -> bool:
self.executor = TTSServerExecutor()
self.config_file = config_file
self.config = get_config(config_file)
......@@ -68,6 +68,7 @@ class TTSEngine(BaseEngine):
lang=self.config.lang)
logger.info("Initialize TTS server engine successfully.")
return True
def postprocess(self,
wav,
......
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册