Skip to content

Commit

Permalink
推理api改为post,支持更长文本推理
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyuxiaoxiao committed Nov 8, 2023
1 parent 051db45 commit 5ba58a3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/infer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export default {
// 推理指定模型
let url = `/voice`
let params = {
text: texts,
model_id: parseInt(model.id),
speaker_name: model.speaker_name,
sdp_ratio: model.sdp_ratio,
Expand All @@ -135,7 +134,7 @@ export default {
}
try {
model.audio.loading = true
let response = await axios.get(url, {
let response = await axios.post(url, {"text": texts}, {
params: params,
responseType: "blob"
})
Expand Down Expand Up @@ -327,7 +326,7 @@ export default {
</script>

<template>
<a-row justify="start" :gutter="[16,16]">
<a-row justify="start" :gutter="[16,16]" align="bottom">
<a-col :span="12">
<a-row justify="start" :gutter="[16,16]">
<!-- 状态栏 -->
Expand Down

0 comments on commit 5ba58a3

Please sign in to comment.