feat: add script tts backend
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package com.emotion.service;
|
||||
|
||||
public interface TtsEngineClient {
|
||||
|
||||
TtsEngineResult synthesize(String text, String voice, String outputPath);
|
||||
|
||||
class TtsEngineResult {
|
||||
private final boolean success;
|
||||
private final String audioPath;
|
||||
private final Long durationMs;
|
||||
private final String errorMessage;
|
||||
|
||||
public TtsEngineResult(boolean success, String audioPath, Long durationMs, String errorMessage) {
|
||||
this.success = success;
|
||||
this.audioPath = audioPath;
|
||||
this.durationMs = durationMs;
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public String getAudioPath() {
|
||||
return audioPath;
|
||||
}
|
||||
|
||||
public Long getDurationMs() {
|
||||
return durationMs;
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user