fixing urls
This commit is contained in:
parent
7acdbb3136
commit
4fd825e1ae
|
|
@ -53,7 +53,7 @@ function playRecord() {
|
||||||
|
|
||||||
function playMsg(msg: ChatMsg) {
|
function playMsg(msg: ChatMsg) {
|
||||||
const audio = new Audio(
|
const audio = new Audio(
|
||||||
"http://100.82.51.22:8001/speak?" +
|
"/speak?" +
|
||||||
new URLSearchParams({ text: msg.content }),
|
new URLSearchParams({ text: msg.content }),
|
||||||
);
|
);
|
||||||
console.log("loading audio and playing?");
|
console.log("loading audio and playing?");
|
||||||
|
|
@ -79,7 +79,7 @@ function App() {
|
||||||
function sendAudio() {
|
function sendAudio() {
|
||||||
var formData = new FormData();
|
var formData = new FormData();
|
||||||
formData.append("audio", new Blob(audioBlobs, { type: "audio/webm" }));
|
formData.append("audio", new Blob(audioBlobs, { type: "audio/webm" }));
|
||||||
fetch("http://100.82.51.22:8001/get-text", {
|
fetch("/get-text", {
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"body": formData,
|
"body": formData,
|
||||||
}).then((res) => res.json())
|
}).then((res) => res.json())
|
||||||
|
|
@ -88,7 +88,7 @@ function App() {
|
||||||
...curState,
|
...curState,
|
||||||
{ "role": "user", "content": res["user-transcript"] },
|
{ "role": "user", "content": res["user-transcript"] },
|
||||||
]);
|
]);
|
||||||
fetch("http://100.82.51.22:8001/conversation", {
|
fetch("/conversation", {
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"body": JSON.stringify([...chatState, {
|
"body": JSON.stringify([...chatState, {
|
||||||
"role": "user",
|
"role": "user",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue