提交 645b3a39 编写于 作者: Y yangyaming

fix bugs for model.py and demo_server.py.

上级 a4d02322
#! /usr/bin/bash
#! /usr/bin/env bash
TRAIN_MANIFEST="cloud/cloud_manifests/cloud.manifest.train"
DEV_MANIFEST="cloud/cloud_manifests/cloud.manifest.dev"
......
#! /usr/bin/bash
#! /usr/bin/env bash
TRAIN_MANIFEST=$1
DEV_MANIFEST=$2
......
#! /usr/bin/bash
#! /usr/bin/env bash
mkdir cloud_manifests
......
......@@ -100,7 +100,7 @@ class AsrRequestHandler(SocketServer.BaseRequestHandler):
finish_time = time.time()
print("Response Time: %f, Transcript: %s" %
(finish_time - start_time, transcript))
self.request.sendall(transcript)
self.request.sendall(transcript.encode('utf-8'))
def _write_to_file(self, data):
# prepare save dir and filename
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
# TODO: replace the model with a mandarin model
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
#! /usr/bin/bash
#! /usr/bin/env bash
pushd ../.. > /dev/null
......
......@@ -7,6 +7,7 @@ import sys
import os
import time
import gzip
from distutils.dir_util import mkpath
import paddle.v2 as paddle
from model_utils.lm_scorer import LmScorer
from model_utils.decoder import ctc_greedy_decoder, ctc_beam_search_decoder
......@@ -79,7 +80,7 @@ class DeepSpeech2Model(object):
"""
# prepare model output directory
if not os.path.exists(output_model_dir):
os.mkdir(output_model_dir)
mkpath(output_model_dir)
# prepare optimizer and trainer
optimizer = paddle.optimizer.Adam(
......
#! /usr/bin/bash
#! /usr/bin/env bash
source ../../utils/utility.sh
......
#! /usr/bin/bash
#! /usr/bin/env bash
source ../../utils/utility.sh
......
#! /usr/bin/bash
#! /usr/bin/env bash
source ../../utils/utility.sh
......
#! /usr/bin/bash
#! /usr/bin/env bash
source ../../utils/utility.sh
......
#!/bin/bash
#! /usr/bin/env bash
# install python dependencies
if [ -f "requirements.txt" ]; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册