语音优化

This commit is contained in:
2026-02-25 16:28:31 +08:00
parent 214c1f0f37
commit 0efca50be3
39 changed files with 237 additions and 1093 deletions

View File

@@ -89,8 +89,8 @@
</a-button>
</a-upload>
<div class="upload-hint">
支持格式MP3WAVAACM4AFLACOGG单个文件不超过 50MB<br>
<span class="hint-text">🎤 配音建议使用 30 - 2 分钟的短配音效果更佳</span>
支持格式MP3WAVAACM4AFLACOGG单个文件不超过 5MB<br>
<span class="hint-text">🎤 配音建议使用 5-20 的短配音效果更佳</span>
</div>
</a-form-item>
@@ -129,7 +129,7 @@ const DEFAULT_FORM_DATA = {
fileUrl: ''
}
const MAX_FILE_SIZE = 50 * 1024 * 1024
const MAX_FILE_SIZE = 5 * 1024 * 1024 // SiliconFlow API 限制参考音频不超过 5MB
const VALID_AUDIO_TYPES = ['audio/mpeg', 'audio/wav', 'audio/wave', 'audio/x-wav', 'audio/aac', 'audio/mp4', 'audio/flac', 'audio/ogg']
const VALID_AUDIO_EXTENSIONS = ['.mp3', '.wav', '.aac', '.m4a', '.flac', '.ogg']
@@ -290,7 +290,7 @@ function handlePlayAudio(record) {
// ========== 文件上传 ==========
function handleBeforeUpload(file) {
if (file.size > MAX_FILE_SIZE) {
message.error('文件大小不能超过 50MB')
message.error('文件大小不能超过 5MB')
return false
}