From 2ea6cf1fc43addb2bf9e134a91c064e9e120d4ce Mon Sep 17 00:00:00 2001 From: Mathieu B Date: Thu, 1 Dec 2022 21:31:08 +0100 Subject: [PATCH] new endpoint for voice --- .../main/java/ch/broillet/jarvis/android/pages/MainPage.kt | 4 ++-- .../java/ch/broillet/jarvis/android/utils/RequestsUtils.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/ch/broillet/jarvis/android/pages/MainPage.kt b/app/src/main/java/ch/broillet/jarvis/android/pages/MainPage.kt index 37701c9..36cdc60 100644 --- a/app/src/main/java/ch/broillet/jarvis/android/pages/MainPage.kt +++ b/app/src/main/java/ch/broillet/jarvis/android/pages/MainPage.kt @@ -179,8 +179,8 @@ fun DisplayMainPage( val sent = json.getString("transcription") uiState.addMessage(Message(false, sent)) - Thread.sleep(1000) - uiState.addMessage(Message(true, json.getString("answer"))) + // Thread.sleep(1000) + // uiState.addMessage(Message(true, json.getString("answer"))) audioRecorder.getOutputFile().delete() } } diff --git a/app/src/main/java/ch/broillet/jarvis/android/utils/RequestsUtils.kt b/app/src/main/java/ch/broillet/jarvis/android/utils/RequestsUtils.kt index 4c3fd20..0376894 100644 --- a/app/src/main/java/ch/broillet/jarvis/android/utils/RequestsUtils.kt +++ b/app/src/main/java/ch/broillet/jarvis/android/utils/RequestsUtils.kt @@ -11,7 +11,7 @@ fun contactServerWithFileAudioRecording(file: File): String { val client = OkHttpClient() 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())) .build()