未验证 提交 87985733 编写于 作者: J Jackwaterveg 提交者: GitHub

[version]add paddlespeech.__version__ (#1166)

* add paddlespeech.__version__

* version 0.1.0 is ready
上级 62240bbf
......@@ -11,3 +11,5 @@
# 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.
__version__ = '0.1.0'
......@@ -102,10 +102,12 @@ class ASRExecutor(BaseExecutor):
default=None,
help='Checkpoint file of model.')
self.parser.add_argument(
'--yes','-y',
'--yes',
'-y',
action="store_true",
default=False,
help='No additional parameters required. Once set this parameter, it means accepting the request of the program by default, which includes transforming the audio sample rate')
help='No additional parameters required. Once set this parameter, it means accepting the request of the program by default, which includes transforming the audio sample rate'
)
self.parser.add_argument(
'--device',
type=str,
......@@ -379,19 +381,22 @@ class ASRExecutor(BaseExecutor):
If the result does not meet your expectations,\n \
Please input the 16k 16 bit 1 channel wav file. \
".format(self.sample_rate, self.sample_rate))
if force_yes == False:
if force_yes is False:
while (True):
logger.info(
"Whether to change the sample rate and the channel. Y: change the sample. N: exit the prgream."
)
content = input("Input(Y/N):")
if content.strip() == "Y" or content.strip(
) == "y" or content.strip() == "yes" or content.strip() == "Yes":
) == "y" or content.strip() == "yes" or content.strip(
) == "Yes":
logger.info(
"change the sampele rate, channel to 16k and 1 channel")
"change the sampele rate, channel to 16k and 1 channel"
)
break
elif content.strip() == "N" or content.strip(
) == "n" or content.strip() == "no" or content.strip() == "No":
) == "n" or content.strip() == "no" or content.strip(
) == "No":
logger.info("Exit the program")
exit(1)
else:
......@@ -418,8 +423,8 @@ class ASRExecutor(BaseExecutor):
device = parser_args.device
try:
res = self(audio_file, model, lang, sample_rate, config, ckpt_path, force_yes,
device)
res = self(audio_file, model, lang, sample_rate, config, ckpt_path,
force_yes, device)
logger.info('ASR Result: {}'.format(res))
return True
except Exception as e:
......
......@@ -171,7 +171,7 @@ class UploadCommand(Command):
setup_info = dict(
# Metadata
name='paddlespeech',
version='0.1.0rc',
version='0.1.0',
author='PaddlePaddle Speech and Language Team',
author_email='paddlesl@baidu.com',
url='https://github.com/PaddlePaddle/PaddleSpeech',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册