new endpoint for voice

This commit is contained in:
Mathieu B 2022-12-01 21:31:08 +01:00
parent f1f070e0c7
commit 2ea6cf1fc4
2 changed files with 3 additions and 3 deletions

View File

@ -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()
} }
} }

View File

@ -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()