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