Files
voice_recognition/server_cuda/lib/whisper_server/transcription_socket.ex
2025-07-29 17:20:42 +00:00

19 lines
597 B
Elixir

# 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