AI面试 文字转音频

This commit is contained in:
堂吉诃德拉曼查的英豪
2026-08-27 15:01:02 +08:00
parent a2b3310860
commit 885316c990
3 changed files with 33 additions and 1 deletions

View File

@@ -10,4 +10,5 @@ namespace Dhd\Micro\Interface\AIService;
interface AIService extends
AiEssayCheckInterface,
AiInterviewCheckInterface {}
AiInterviewCheckInterface,
AiInterviewTtsInterface {}

View File

@@ -0,0 +1,25 @@
<?php
/**
* AI面试朗读(TTS)相关接口
*/
declare(strict_types=1);
namespace Dhd\Micro\Interface\AIService;
interface AiInterviewTtsInterface
{
/**
* 朗读面试题(文字转语音):懒生成并缓存,已存在则直接返回已有音频
* 音频按题目(question_id)生成并全局复用
* @param array $params 参数,['question_id'=>面试题ID]
*/
public function interviewTtsAudio(array $params): array;
/**
* 查询面试题是否已生成音频,仅查缓存不触发合成(供取题接口附带音频使用)
* @param int $questionId 面试题ID
*/
public function getInterviewQuestionAudioUrl(int $questionId): ?string;
}

View File

@@ -27,4 +27,10 @@ interface FileServiceInterface
* 获取文件列表
*/
public function getFileList(array $params): array;
/**
* 保存二进制(base64)文件,用于服务端生成的文件
* @param array $params 参数,如 ['base64'=>.., 'file_name'=>.., 'file_type'=>.., 'group_id'=>.., 'channel'=>.., 'uploader_id'=>..]
*/
public function saveBase64File(array $params): array;
}