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