AI面试 文字转音频
This commit is contained in:
@@ -10,4 +10,5 @@ namespace Dhd\Micro\Interface\AIService;
|
||||
|
||||
interface AIService extends
|
||||
AiEssayCheckInterface,
|
||||
AiInterviewCheckInterface {}
|
||||
AiInterviewCheckInterface,
|
||||
AiInterviewTtsInterface {}
|
||||
|
||||
25
src/AIService/AiInterviewTtsInterface.php
Normal file
25
src/AIService/AiInterviewTtsInterface.php
Normal 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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user