办学质量监测教学评价系统
ageer
2025-05-16 158a0190b5a7b93c0d31541c1e350e5221519fb1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package org.ruoyi.chat.service.chat;
 
import jakarta.servlet.http.HttpServletRequest;
import org.ruoyi.common.chat.request.ChatRequest;
import org.ruoyi.common.chat.entity.Tts.TextToSpeech;
import org.ruoyi.common.chat.entity.files.UploadFileResponse;
import org.ruoyi.common.chat.entity.whisper.WhisperResponse;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
 
 
/**
 * 用户聊天管理Service接口
 *
 * @author ageerle
 * @date 2025-04-08
 */
public interface ISseService {
 
    /**
     * 客户端发送消息到服务端
     * @param chatRequest 请求对象
     */
    SseEmitter sseChat(ChatRequest chatRequest, HttpServletRequest request);
 
    /**
     * 语音转文字
     * @param file 语音文件
     */
   WhisperResponse speechToTextTranscriptionsV2(MultipartFile file);
 
    /**
     * 文字转语音
     *
     * @param textToSpeech 文本信息
     * @return 流式语音
     */
    ResponseEntity<Resource> textToSpeed(TextToSpeech textToSpeech);
 
    /**
     * 上传文件到服务器
     *
     * @param file 文件信息
     * @return 返回文件信息
     */
    UploadFileResponse upload(MultipartFile file);
 
 
}