视频保存

This commit is contained in:
duoaohui
2026-05-19 14:34:54 +08:00
parent 6d61bf2428
commit 624b38140d
3 changed files with 14 additions and 6 deletions

View File

@@ -154,7 +154,7 @@ func (c *OpenAICompatibleClient) Transcribe(ctx context.Context, cfg *dao.STTCon
// downloadAudio 从给定 URL 拉取音频内容,返回字节流 + 推断的文件名
//
// 文件名仅作为 multipart 的 filename 参数,主要决定 Content-Type 推断;
// 取 URL path 末段,无后缀则默认 recording.mp4
// 取 URL path 末段,无后缀则默认 recording.webm与 media-server 实际产物一致)
func (c *OpenAICompatibleClient) downloadAudio(ctx context.Context, fileURL string) ([]byte, string, error) {
req, err := http.NewRequestWithContext(ctx, http.MethodGet, fileURL, nil)
if err != nil {