Skip to content

Commit

Permalink
Starting refactor of transports into their own directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Moishe committed Mar 26, 2024
1 parent 24fb7c5 commit 2fc5de6
Show file tree
Hide file tree
Showing 29 changed files with 58 additions and 58 deletions.
4 changes: 2 additions & 2 deletions examples/foundational/01-say-one-thing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from dailyai.pipeline.frames import EndFrame, TextFrame
from dailyai.pipeline.pipeline import Pipeline

from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.elevenlabs_ai_service import ElevenLabsTTSService

from runner import configure
Expand All @@ -20,7 +20,7 @@

async def main(room_url):
async with aiohttp.ClientSession() as session:
transport = DailyTransportService(
transport = DailyTransport(
room_url,
None,
"Say One Thing",
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/01a-local-transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os

from dailyai.services.elevenlabs_ai_service import ElevenLabsTTSService
from dailyai.services.local_transport_service import LocalTransportService
from dailyai.transports.local_transport import LocalTransport

logging.basicConfig(format=f"%(levelno)s %(asctime)s %(message)s")
logger = logging.getLogger("dailyai")
Expand All @@ -14,7 +14,7 @@
async def main():
async with aiohttp.ClientSession() as session:
meeting_duration_minutes = 1
transport = LocalTransportService(
transport = LocalTransport(
duration_minutes=meeting_duration_minutes, mic_enabled=True
)
tts = ElevenLabsTTSService(
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/02-llm-say-one-thing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from dailyai.pipeline.frames import EndFrame, LLMMessagesQueueFrame
from dailyai.pipeline.pipeline import Pipeline
from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.elevenlabs_ai_service import ElevenLabsTTSService
from dailyai.services.open_ai_services import OpenAILLMService

Expand All @@ -22,7 +22,7 @@

async def main(room_url):
async with aiohttp.ClientSession() as session:
transport = DailyTransportService(
transport = DailyTransport(
room_url,
None,
"Say One Thing From an LLM",
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/03-still-frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from dailyai.pipeline.frames import TextFrame
from dailyai.pipeline.pipeline import Pipeline
from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.fal_ai_services import FalImageGenService

from runner import configure
Expand All @@ -20,7 +20,7 @@

async def main(room_url):
async with aiohttp.ClientSession() as session:
transport = DailyTransportService(
transport = DailyTransport(
room_url,
None,
"Show a still frame image",
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/03a-image-local.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from dailyai.pipeline.frames import TextFrame
from dailyai.services.fal_ai_services import FalImageGenService
from dailyai.services.local_transport_service import LocalTransportService
from dailyai.transports.local_transport import LocalTransport

logging.basicConfig(format=f"%(levelno)s %(asctime)s %(message)s")
logger = logging.getLogger("dailyai")
Expand All @@ -22,7 +22,7 @@ async def main():
meeting_duration_minutes = 2
tk_root = tk.Tk()
tk_root.title("Calendar")
transport = LocalTransportService(
transport = LocalTransport(
tk_root=tk_root,
mic_enabled=True,
camera_enabled=True,
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/04-utterance-and-speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dailyai.pipeline.merge_pipeline import SequentialMergePipeline
from dailyai.pipeline.pipeline import Pipeline

from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.azure_ai_services import AzureLLMService, AzureTTSService
from dailyai.services.deepgram_ai_services import DeepgramTTSService
from dailyai.pipeline.frames import EndPipeFrame, LLMMessagesQueueFrame, TextFrame
Expand All @@ -24,7 +24,7 @@

async def main(room_url: str):
async with aiohttp.ClientSession() as session:
transport = DailyTransportService(
transport = DailyTransport(
room_url,
None,
"Static And Dynamic Speech",
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/05-sync-speech-and-image.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from dailyai.pipeline.frame_processor import FrameProcessor

from dailyai.pipeline.pipeline import Pipeline
from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.open_ai_services import OpenAILLMService
from dailyai.services.elevenlabs_ai_service import ElevenLabsTTSService
from dailyai.services.fal_ai_services import FalImageGenService
Expand Down Expand Up @@ -63,7 +63,7 @@ async def process_frame(self, frame: Frame) -> AsyncGenerator[Frame, None]:

async def main(room_url):
async with aiohttp.ClientSession() as session:
transport = DailyTransportService(
transport = DailyTransport(
room_url,
None,
"Month Narration Bot",
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/05a-local-sync-speech-and-text.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from dailyai.services.open_ai_services import OpenAILLMService
from dailyai.services.elevenlabs_ai_service import ElevenLabsTTSService
from dailyai.services.fal_ai_services import FalImageGenService
from dailyai.services.local_transport_service import LocalTransportService
from dailyai.transports.local_transport import LocalTransport

logging.basicConfig(format=f"%(levelno)s %(asctime)s %(message)s")
logger = logging.getLogger("dailyai")
Expand All @@ -22,7 +22,7 @@ async def main(room_url):
tk_root = tk.Tk()
tk_root.title("Calendar")

transport = LocalTransportService(
transport = LocalTransport(
mic_enabled=True,
camera_enabled=True,
camera_width=1024,
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/06-listen-and-respond.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from dailyai.pipeline.frames import LLMMessagesQueueFrame
from dailyai.pipeline.pipeline import Pipeline

from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.elevenlabs_ai_service import ElevenLabsTTSService
from dailyai.services.open_ai_services import OpenAILLMService
from dailyai.services.ai_services import FrameLogger
Expand All @@ -25,7 +25,7 @@

async def main(room_url: str, token):
async with aiohttp.ClientSession() as session:
transport = DailyTransportService(
transport = DailyTransport(
room_url,
token,
"Respond bot",
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/06a-image-sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from PIL import Image

from dailyai.pipeline.frames import ImageFrame, Frame
from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.ai_services import AIService
from dailyai.pipeline.aggregators import (
LLMAssistantContextAggregator,
Expand Down Expand Up @@ -42,7 +42,7 @@ async def process_frame(self, frame: Frame) -> AsyncGenerator[Frame, None]:

async def main(room_url: str, token):
async with aiohttp.ClientSession() as session:
transport = DailyTransportService(
transport = DailyTransport(
room_url,
token,
"Respond bot",
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/07-interruptible.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from dailyai.pipeline.pipeline import Pipeline
from dailyai.services.ai_services import FrameLogger
from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.open_ai_services import OpenAILLMService
from dailyai.services.elevenlabs_ai_service import ElevenLabsTTSService

Expand All @@ -25,7 +25,7 @@

async def main(room_url: str, token):
async with aiohttp.ClientSession() as session:
transport = DailyTransportService(
transport = DailyTransport(
room_url,
token,
"Respond bot",
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/08-bots-arguing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dailyai.pipeline.aggregators import SentenceAggregator
from dailyai.pipeline.pipeline import Pipeline

from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.azure_ai_services import AzureLLMService, AzureTTSService
from dailyai.services.elevenlabs_ai_service import ElevenLabsTTSService
from dailyai.services.fal_ai_services import FalImageGenService
Expand All @@ -24,7 +24,7 @@

async def main(room_url: str):
async with aiohttp.ClientSession() as session:
transport = DailyTransportService(
transport = DailyTransport(
room_url,
None,
"Respond bot",
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/10-wake-word.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import AsyncGenerator
from PIL import Image

from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.open_ai_services import OpenAILLMService
from dailyai.services.elevenlabs_ai_service import ElevenLabsTTSService
from dailyai.pipeline.aggregators import (
Expand Down Expand Up @@ -116,7 +116,7 @@ async def process_frame(self, frame: Frame) -> AsyncGenerator[Frame, None]:

async def main(room_url: str, token):
async with aiohttp.ClientSession() as session:
transport = DailyTransportService(
transport = DailyTransport(
room_url,
token,
"Santa Cat",
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/11-sound-effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
import wave

from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.open_ai_services import OpenAILLMService
from dailyai.services.elevenlabs_ai_service import ElevenLabsTTSService
from dailyai.pipeline.aggregators import (
Expand Down Expand Up @@ -72,7 +72,7 @@ async def process_frame(self, frame: Frame) -> AsyncGenerator[Frame, None]:

async def main(room_url: str, token):
async with aiohttp.ClientSession() as session:
transport = DailyTransportService(
transport = DailyTransport(
room_url,
token,
"Respond bot",
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/13-whisper-transcription.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import asyncio
import logging

from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.whisper_ai_services import WhisperSTTService

from runner import configure
Expand All @@ -15,7 +15,7 @@


async def main(room_url: str):
transport = DailyTransportService(
transport = DailyTransport(
room_url,
None,
"Transcription bot",
Expand Down
4 changes: 2 additions & 2 deletions examples/foundational/13a-whisper-local.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging
from dailyai.pipeline.frames import EndFrame, TranscriptionQueueFrame

from dailyai.services.local_transport_service import LocalTransportService
from dailyai.transports.local_transport import LocalTransport
from dailyai.services.whisper_ai_services import WhisperSTTService

logging.basicConfig(format=f"%(levelno)s %(asctime)s %(message)s")
Expand All @@ -16,7 +16,7 @@ async def main(room_url: str):
global stt

meeting_duration_minutes = 1
transport = LocalTransportService(
transport = LocalTransport(
mic_enabled=True,
camera_enabled=False,
speaker_enabled=True,
Expand Down
2 changes: 1 addition & 1 deletion examples/foundational/websocket-server/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dailyai.pipeline.frames import TextFrame, TranscriptionQueueFrame
from dailyai.pipeline.pipeline import Pipeline
from dailyai.services.elevenlabs_ai_service import ElevenLabsTTSService
from dailyai.services.websocket_transport_service import WebsocketTransport
from dailyai.transports.websocket_transport import WebsocketTransport
from dailyai.services.whisper_ai_services import WhisperSTTService

logging.basicConfig(format="%(levelno)s %(asctime)s %(message)s")
Expand Down
4 changes: 2 additions & 2 deletions examples/image-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import urllib.parse
import random

from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.azure_ai_services import AzureLLMService, AzureTTSService
from dailyai.pipeline.frames import Frame, FrameType
from dailyai.services.fal_ai_services import FalImageGenService
Expand All @@ -17,7 +17,7 @@ async def main(room_url: str, token):
global llm
global tts

transport = DailyTransportService(
transport = DailyTransport(
room_url,
token,
"Imagebot",
Expand Down
4 changes: 2 additions & 2 deletions examples/internal/11a-dial-out.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import wave

from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.azure_ai_services import AzureLLMService, AzureTTSService
from dailyai.pipeline.aggregators import LLMContextAggregator
from dailyai.services.ai_services import AIService, FrameLogger
Expand Down Expand Up @@ -66,7 +66,7 @@ async def main(room_url: str, token, phone):
global llm
global tts

transport = DailyTransportService(
transport = DailyTransport(
room_url,
token,
"Respond bot",
Expand Down
4 changes: 2 additions & 2 deletions examples/starter-apps/chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
)
from dailyai.services.ai_services import AIService
from dailyai.pipeline.pipeline import Pipeline
from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.open_ai_services import OpenAILLMService
from dailyai.services.elevenlabs_ai_service import ElevenLabsTTSService

Expand Down Expand Up @@ -92,7 +92,7 @@ async def process_frame(self, frame: Frame) -> AsyncGenerator[Frame, None]:

async def main(room_url: str, token):
async with aiohttp.ClientSession() as session:
transport = DailyTransportService(
transport = DailyTransport(
room_url,
token,
"Chatbot",
Expand Down
4 changes: 2 additions & 2 deletions examples/starter-apps/patient-intake.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)

from dailyai.pipeline.pipeline import Pipeline
from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.openai_llm_context import OpenAILLMContext
from dailyai.services.open_ai_services import OpenAILLMService
# from dailyai.services.deepgram_ai_services import DeepgramTTSService
Expand Down Expand Up @@ -292,7 +292,7 @@ async def main(room_url: str, token):
global llm
global tts

transport = DailyTransportService(
transport = DailyTransport(
room_url,
token,
"Intake Bot",
Expand Down
4 changes: 2 additions & 2 deletions examples/starter-apps/storybot.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from dailyai.pipeline.pipeline import Pipeline
from dailyai.pipeline.frame_processor import FrameProcessor
from dailyai.services.daily_transport_service import DailyTransportService
from dailyai.transports.daily_transport import DailyTransport
from dailyai.services.azure_ai_services import AzureLLMService, AzureTTSService
from dailyai.services.fal_ai_services import FalImageGenService
from dailyai.services.open_ai_services import OpenAILLMService
Expand Down Expand Up @@ -214,7 +214,7 @@ async def main(room_url: str, token):
sp = StoryProcessor(messages, story)
sig = StoryImageGenerator(story, llm, img)

transport = DailyTransportService(
transport = DailyTransport(
room_url,
token,
"Storybot",
Expand Down
Loading

0 comments on commit 2fc5de6

Please sign in to comment.