请问一下是只支持wav格式的视频吗,我调接口出错!
{"code":-1,"msg":"clean_wav failed:format failed: fail to format"}
问题如图。
报错信息{"code":-1,"msg":"'Logger' object has no attribute 'warn'"},我想知道这个问题应该如何解决
代码如下
<script>
function callApi() {
// 定义接口的 URL
const apiUrl = 'http://xxxxxxx:18180/v1/preprocess_and_tran';
// 定义请求参数,修改 format 字段的值
const requestData = {
"format": "wav",
"reference_audio": "382714807.mp4",
"lang": "zh"
};
// 发起 POST 请求
fetch(apiUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(requestData)
})
.then(response => response.json())
.then(data => {
// 将响应结果显示在页面上
document.getElementById('result').innerHTML = JSON.stringify(data);
})
.catch(error => {
// 处理请求过程中出现的错误
document.getElementById('result').innerHTML = '请求出错: ' + error.message;
});
}
</script>
This is the timbre for training TTS. Only WAV files are required, and MP4 files are not needed.
/{ "format": ".wav", "reference_audio": "0414-01.wav", "lang": "zh" }
wav文件复制到容器的/code/data,POST接口返回这个,是文件格式问题么? ` [ { "type": "literal_error", "loc": [ "format" ], "msg": "Input should be 'wav', 'mp3' or 'flac'", "input": ".wav", "ctx": { "expected": "'wav', 'mp3' or 'flac'" }, "url": "https://errors.pydantic.dev/2.8/v/literal_error" } ]
`
哎,知道了,CSDN一把的教程写的是 "format": ".wav", 只要写 wav 就好。以后屏蔽CSDN得了。
问题如图。 报错信息{"code":-1,"msg":"'Logger' object has no attribute 'warn'"},我想知道这个问题应该如何解决
这个怎么解决的,我用api调用模特训练出这个问题