new endpoint for voice
This commit is contained in:
parent
f1f070e0c7
commit
2ea6cf1fc4
@ -179,8 +179,8 @@ fun DisplayMainPage(
|
|||||||
val sent = json.getString("transcription")
|
val sent = json.getString("transcription")
|
||||||
|
|
||||||
uiState.addMessage(Message(false, sent))
|
uiState.addMessage(Message(false, sent))
|
||||||
Thread.sleep(1000)
|
// Thread.sleep(1000)
|
||||||
uiState.addMessage(Message(true, json.getString("answer")))
|
// uiState.addMessage(Message(true, json.getString("answer")))
|
||||||
audioRecorder.getOutputFile().delete()
|
audioRecorder.getOutputFile().delete()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ fun contactServerWithFileAudioRecording(file: File): String {
|
|||||||
val client = OkHttpClient()
|
val client = OkHttpClient()
|
||||||
|
|
||||||
val request = Request.Builder()
|
val request = Request.Builder()
|
||||||
.url("https://jarvis-server.broillet.ch/process_audio_request_file")
|
.url("https://jarvis-server.broillet.ch/process_voice")
|
||||||
.post(file.asRequestBody("audio/x-wav; charset=utf-8".toMediaType()))
|
.post(file.asRequestBody("audio/x-wav; charset=utf-8".toMediaType()))
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user