Files
smartDriveEE/src/main/java/com/rj/service/ITtsRequestLogService.java
2025-10-21 09:23:23 +08:00

62 lines
1.3 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.rj.service;
import com.rj.entity.TtsRequestLog;
import com.rj.utils.MinIOUrlGenerator;
import com.rj.dto.AsrRequest;
import com.rj.dto.AsrResponse;
/**
* TTS请求日志服务接口
*
* @author rj
* @date 2025-01-02
*/
public interface ITtsRequestLogService {
/**
* 保存TTS请求日志
*
* @param log 请求日志
* @return 是否保存成功
*/
boolean saveTtsRequestLog(TtsRequestLog log);
/**
* 根据ID查询请求日志
*
* @param id 日志ID
* @return 请求日志
*/
TtsRequestLog getTtsRequestLogById(String id);
/**
* 根据音频名称设置短链接
*
* @return 是否设置成功
*/
boolean setShortUrlByAudioName(MinIOUrlGenerator.UrlInfo urlInfo );
/**
* 根据音频名称设置短链接使用默认15分钟过期时间
*
* @param audioName 音频名称
* @return 是否设置成功
*/
boolean setShortUrlByAudioName(String audioName);
/**
* 语音转文本
*
* @param request ASR请求
* @return ASR响应
*/
AsrResponse speechToText(AsrRequest request);
/**
* 检查ASR服务是否可用
*
* @return 是否可用
*/
boolean isAsrServiceAvailable();
}