# defmodule WhisperServer.TranscriptionSocket do # @behaviour :cowboy_websocket # def init(req, _opts) do # {:cowboy_websocket, req, %{chunks: []}} # end # def websocket_init(state), do: {:ok, state} # def websocket_handle({:binary, data}, state) do # IO.puts("🟡 Recibido chunk de #{byte_size(data)} bytes") # {:reply, {:text, ~s({"text": "chunk received, size #{byte_size(data)}"})}, state} # end # def websocket_handle(_data, state), do: {:ok, state} # def websocket_info(_info, state), do: {:ok, state} # def terminate(_reason, _req, _state), do: :ok # end