如何在不同的行中编写这个 python 命令?

问题描述 投票:0回答:0

我在 python 中有这个命令,它调用开源(深度语音)进行语音识别,并将我的模型路径和音频识别文本并生成 json 文件作为输出

如何分行写清楚

这是旧代码

!deepspeech --json --model D:/model1.pb --scorer D:/model2.scorer --audio D:/result/input.wav >D:/result/output.json

这是我想写的代码

model1="D:/model.pb"
model2="D:/model.scorer"
audio_path="D:/result/input.wav"
json_path="D:/result/output.json"

!deepspeech --json --model model1 --scorer model2 --audio audio_path >json_path
python speech-recognition mozilla-deepspeech
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.