语音优化
This commit is contained in:
@@ -89,8 +89,8 @@
|
||||
</a-button>
|
||||
</a-upload>
|
||||
<div class="upload-hint">
|
||||
支持格式:MP3、WAV、AAC、M4A、FLAC、OGG,单个文件不超过 50MB<br>
|
||||
<span class="hint-text">🎤 配音建议:使用 30 秒 - 2 分钟的短配音效果更佳</span>
|
||||
支持格式:MP3、WAV、AAC、M4A、FLAC、OGG,单个文件不超过 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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user