fix: /usr/sbin/tts_play.sh
This commit is contained in:
@@ -80,7 +80,7 @@ impl SpeakerManager {
|
|||||||
/// TTS
|
/// TTS
|
||||||
pub async fn play_text(text: &str) -> Result<bool, AppError> {
|
pub async fn play_text(text: &str) -> Result<bool, AppError> {
|
||||||
const COMMAND: &str = r#"
|
const COMMAND: &str = r#"
|
||||||
/usr/sbin/tts_play2.sh '%s'
|
/usr/sbin/tts_play.sh '%s'
|
||||||
"#;
|
"#;
|
||||||
let script = COMMAND.replace("%s", text);
|
let script = COMMAND.replace("%s", text);
|
||||||
let res = SpeakerManager::run_shell(&script).await?;
|
let res = SpeakerManager::run_shell(&script).await?;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class SpeakerManager implements ISpeaker {
|
|||||||
const res = await this.runShell(
|
const res = await this.runShell(
|
||||||
url
|
url
|
||||||
? `miplayer -f '${url}'`
|
? `miplayer -f '${url}'`
|
||||||
: `/usr/sbin/tts_play2.sh '${text || "你好"}'`,
|
: `/usr/sbin/tts_play.sh '${text || "你好"}'`,
|
||||||
{ timeout }
|
{ timeout }
|
||||||
);
|
);
|
||||||
return res?.exit_code === 0;
|
return res?.exit_code === 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user