Compare commits
8 Commits
e1a0a2b638
...
zd-feature
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f258560a4 | ||
|
|
9e3b6a400d | ||
|
|
bfe41c4b99 | ||
|
|
7e13db52bf | ||
|
|
885316c990 | ||
|
|
a2b3310860 | ||
| a0194a8d38 | |||
| 25bfb2aeea |
@@ -10,4 +10,5 @@ namespace Dhd\Micro\Interface\AIService;
|
||||
|
||||
interface AIService extends
|
||||
AiEssayCheckInterface,
|
||||
AiInterviewCheckInterface {}
|
||||
AiInterviewCheckInterface,
|
||||
AiInterviewTtsInterface {}
|
||||
|
||||
47
src/AIService/AiInterviewTtsInterface.php
Normal file
47
src/AIService/AiInterviewTtsInterface.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* 提交朗读任务(异步):已生成直接返回成功,未生成投递队列后台合成并返回排队状态
|
||||
* 音频按题目(question_id)生成并全局复用,同一题目并发只合成一次
|
||||
* @param array $params 参数,['question_id'=>面试题ID]
|
||||
*/
|
||||
public function submitInterviewTts(array $params): array;
|
||||
|
||||
/**
|
||||
* 同步面试题音频(后台创建/编辑题目后调用):按题干内容哈希判断是否已生成,
|
||||
* 内容未变跳过,内容变化或首次生成则投递队列后台合成
|
||||
* @param array $params 参数,['question_id'=>面试题ID, 'content'=>题干内容]
|
||||
* 返回 ['question_id'=>int, 'status'=>success|queued]
|
||||
*/
|
||||
public function syncInterviewQuestionTts(array $params): array;
|
||||
|
||||
/**
|
||||
* 查询朗读任务状态(供前端轮询使用)
|
||||
* @param int $questionId 面试题ID
|
||||
* 返回 ['question_id'=>int, 'status'=>queued|processing|success|failed|unknown, 'url'=>?string]
|
||||
*/
|
||||
public function getInterviewTtsStatus(int $questionId): array;
|
||||
}
|
||||
@@ -89,11 +89,24 @@ interface ExamServiceInterface
|
||||
*/
|
||||
public function appGetWrongRecordModuleDetail(int $userId, int $categoryId): array;
|
||||
|
||||
/**
|
||||
* 获取错题记录首页明细(融合首页统计与各模块知识点明细,一次返回).
|
||||
*/
|
||||
public function appGetWrongRecordDetail(int $userId): array;
|
||||
|
||||
/**
|
||||
* 提交错题记录发起的专项练习(写做题记录并更新错题,返回判分结果与正确率对比).
|
||||
*/
|
||||
public function submitWrongPractice(int $userId, array $params): array;
|
||||
|
||||
/**
|
||||
* 获取用户薄弱项(有错题且正确率低于阈值且正确率最低的模块;无则 null).
|
||||
*
|
||||
* 用于首页弹窗「薄弱项:{模块名}正确率低 → 攻克它 → 专项刷题」,
|
||||
* 以及错题记录页面薄弱项展示;与错题记录首页统计字段 weak_category 同口径.
|
||||
*/
|
||||
public function appGetWeakPoint(int $userId): ?array;
|
||||
|
||||
/**
|
||||
* 获取考试类型列表(V1 兼容接口).
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -45,4 +45,21 @@ interface PgUserPaperRecordInterface
|
||||
* @return void
|
||||
*/
|
||||
public function submitPgUserPaper(int $userId, array $params): void;
|
||||
|
||||
/**
|
||||
* APP获取试卷详情
|
||||
* @param int $userId 用户id
|
||||
* @param int $paperId 试卷id
|
||||
* @return array
|
||||
*/
|
||||
public function appGetPgPaperDetail(int $userId, int $paperId): array;
|
||||
|
||||
/**
|
||||
* 删除用户答题记录
|
||||
* @param int $userId 用户id
|
||||
* @param int $paperId 试卷id
|
||||
* @param int $sectionId 章节id
|
||||
* @return void
|
||||
*/
|
||||
public function deleteUserPaperRecord(int $userId, int $paperId, int $sectionId = 0): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user