From 7e13db52bfd4268b688b266d9ab51f77cdbd098a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A0=82=E5=90=89=E8=AF=83=E5=BE=B7=E6=8B=89=E6=9B=BC?= =?UTF-8?q?=E6=9F=A5=E7=9A=84=E8=8B=B1=E8=B1=AA?= Date: Fri, 28 Aug 2026 10:53:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=A2=E8=AF=95=E6=9C=97=E8=AF=BBTTS?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BC=82=E6=AD=A5=E6=8F=90=E4=BA=A4=E4=B8=8E?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9F=A5=E8=AF=A2=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AIService/AiInterviewTtsInterface.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/AIService/AiInterviewTtsInterface.php b/src/AIService/AiInterviewTtsInterface.php index 35d1810..ae0e9ba 100644 --- a/src/AIService/AiInterviewTtsInterface.php +++ b/src/AIService/AiInterviewTtsInterface.php @@ -22,4 +22,18 @@ interface AiInterviewTtsInterface * @param int $questionId 面试题ID */ public function getInterviewQuestionAudioUrl(int $questionId): ?string; + + /** + * 提交朗读任务(异步):已生成直接返回成功,未生成投递队列后台合成并返回排队状态 + * 音频按题目(question_id)生成并全局复用,同一题目并发只合成一次 + * @param array $params 参数,['question_id'=>面试题ID] + */ + public function submitInterviewTts(array $params): array; + + /** + * 查询朗读任务状态(供前端轮询使用) + * @param int $questionId 面试题ID + * 返回 ['question_id'=>int, 'status'=>queued|processing|success|failed|unknown, 'url'=>?string] + */ + public function getInterviewTtsStatus(int $questionId): array; } \ No newline at end of file