mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 13:50:49 +00:00
fix(tts): keep final webchat audio supplemental
This commit is contained in:
@@ -156,6 +156,7 @@ async function expectTtsPayloadResult(params: {
|
||||
expect(synthesizeMock).toHaveBeenCalledWith(expect.objectContaining({ target: params.target }));
|
||||
expect(result.audioAsVoice).toBe(params.audioAsVoice);
|
||||
expect(result.mediaUrl).toMatch(new RegExp(`voice-\\d+\\.${params.mediaExtension ?? "ogg"}$`));
|
||||
expect(result.spokenText).toBe(params.text);
|
||||
|
||||
mediaDir = result.mediaUrl ? path.dirname(result.mediaUrl) : undefined;
|
||||
} finally {
|
||||
|
||||
@@ -1591,6 +1591,7 @@ export async function maybeApplyTtsToPayload(params: {
|
||||
...nextPayload,
|
||||
mediaUrl: result.audioPath,
|
||||
audioAsVoice: result.audioAsVoice || params.payload.audioAsVoice,
|
||||
spokenText: textForAudio,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user