From f77f6434877930d2a71e4d062f53edc1e64c435d Mon Sep 17 00:00:00 2001 From: Moishe Lettvin Date: Sat, 23 Mar 2024 17:08:49 -0400 Subject: [PATCH] seems to work...? --- .../websocket-server/frames.proto | 25 ++++ .../foundational/websocket-server/index.html | 138 ++++++++++++------ .../foundational/websocket-server/sample.py | 55 ++++--- output-0.wav | Bin 0 -> 160044 bytes output-1.wav | Bin 0 -> 160044 bytes output.wav | Bin 0 -> 160700 bytes src/dailyai/pipeline/frames.py | 3 + .../services/websocket_transport_service.py | 13 +- src/dailyai/services/whisper_ai_services.py | 1 - 9 files changed, 156 insertions(+), 79 deletions(-) create mode 100644 examples/foundational/websocket-server/frames.proto create mode 100644 output-0.wav create mode 100644 output-1.wav create mode 100644 output.wav diff --git a/examples/foundational/websocket-server/frames.proto b/examples/foundational/websocket-server/frames.proto new file mode 100644 index 000000000..7ecea6d25 --- /dev/null +++ b/examples/foundational/websocket-server/frames.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +package dailyai_proto; + +message TextFrame { + string text = 1; +} + +message AudioFrame { + bytes audio = 1; +} + +message TranscriptionFrame { + string text = 1; + string participant_id = 2; + string timestamp = 3; +} + +message Frame { + oneof frame { + TextFrame text = 1; + AudioFrame audio = 2; + TranscriptionFrame transcription = 3; + } +} diff --git a/examples/foundational/websocket-server/index.html b/examples/foundational/websocket-server/index.html index 51b409573..130faeb9e 100644 --- a/examples/foundational/websocket-server/index.html +++ b/examples/foundational/websocket-server/index.html @@ -15,8 +15,12 @@

WebSocket Audio Stream