From 726c6df23f14d25599f9b798885107c1f86f551a Mon Sep 17 00:00:00 2001 From: Kyle McLaren Date: Thu, 12 Sep 2024 15:43:56 +0200 Subject: [PATCH] Update audio_controller.ex to be cog HTTP compliant --- lib/dictaphone_web/controllers/audio_controller.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/dictaphone_web/controllers/audio_controller.ex b/lib/dictaphone_web/controllers/audio_controller.ex index a0f3a96..e38e6d8 100644 --- a/lib/dictaphone_web/controllers/audio_controller.ex +++ b/lib/dictaphone_web/controllers/audio_controller.ex @@ -49,7 +49,11 @@ defmodule DictaphoneWeb.AudioController do ExAws.Config.new(:s3) |> ExAws.S3.presigned_url(:get, bucket, name, expires_in: 3600) - input = %{audio: clip_url} + input = %{input: %{audio: clip_url}} + + whisper_url = URI.parse(whisper_url) + |> Map.put(:path, "/predictions") + |> URI.to_string() %{body: response} = Req.put!(whisper_url,