Save progress
This commit is contained in:
@@ -13,6 +13,7 @@ from pipecat.pipeline.runner import PipelineRunner
|
|||||||
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
from pipecat.pipeline.task import PipelineParams, PipelineTask
|
||||||
from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext
|
from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext
|
||||||
from pipecat.services.cartesia import CartesiaTTSService
|
from pipecat.services.cartesia import CartesiaTTSService
|
||||||
|
from pipecat.services.deepgram import DeepgramTTSService
|
||||||
from pipecat.services.openai import OpenAILLMService
|
from pipecat.services.openai import OpenAILLMService
|
||||||
from pipecat.transports.services.daily import DailyParams, DailyTransport
|
from pipecat.transports.services.daily import DailyParams, DailyTransport
|
||||||
from pipecat.transports.services.helpers.daily_rest import DailyRESTHelper
|
from pipecat.transports.services.helpers.daily_rest import DailyRESTHelper
|
||||||
@@ -54,6 +55,11 @@ class DialoutBot:
|
|||||||
api_key=os.getenv("CARTESIA_API_KEY"),
|
api_key=os.getenv("CARTESIA_API_KEY"),
|
||||||
voice_id="79a125e8-cd45-4c13-8a67-188112f4dd22", # British Lady
|
voice_id="79a125e8-cd45-4c13-8a67-188112f4dd22", # British Lady
|
||||||
)
|
)
|
||||||
|
|
||||||
|
tts = DeepgramTTSService(
|
||||||
|
api_key=os.getenv("DEEPGRAM_API_KEY"),
|
||||||
|
voice="aura-helios-en",
|
||||||
|
)
|
||||||
|
|
||||||
llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4o")
|
llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"), model="gpt-4o")
|
||||||
|
|
||||||
@@ -81,8 +87,8 @@ class DialoutBot:
|
|||||||
task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True))
|
task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True))
|
||||||
|
|
||||||
def get_phone_number(callId: int, run_number: int) -> str:
|
def get_phone_number(callId: int, run_number: int) -> str:
|
||||||
if self.phone_number:
|
# if self.phone_number:
|
||||||
return self.phone_number
|
# return self.phone_number
|
||||||
|
|
||||||
if run_number % 2 == 0:
|
if run_number % 2 == 0:
|
||||||
phone_numbers = [
|
phone_numbers = [
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ async def run_bot(id: int, run_number: int, bot_run_time: int, phone_number: str
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Create daily.co room with dialin and dialout enabled
|
# Create daily.co room with dialin and dialout enabled
|
||||||
exp = time.time() + bot_run_time + 600
|
exp = time.time() + bot_run_time + 600 + 60
|
||||||
room_params = DailyRoomParams(
|
room_params = DailyRoomParams(
|
||||||
properties=DailyRoomProperties(
|
properties=DailyRoomProperties(
|
||||||
exp=exp,
|
exp=exp,
|
||||||
|
|||||||
@@ -1,41 +1,41 @@
|
|||||||
bot_id,enable_dialout,timestamp
|
bot_id,enable_dialout,timestamp
|
||||||
0,True,2024-12-20 15:16:38.801
|
0,True,2024-12-20 17:18:47.197
|
||||||
2,True,2024-12-20 15:16:38.804
|
1,True,2024-12-20 17:18:47.247
|
||||||
3,True,2024-12-20 15:16:38.835
|
0,True,2024-12-20 17:20:03.366
|
||||||
1,True,2024-12-20 15:16:38.940
|
1,True,2024-12-20 17:20:03.392
|
||||||
0,True,2024-12-20 15:17:55.016
|
1,True,2024-12-20 17:21:19.477
|
||||||
2,True,2024-12-20 15:17:55.038
|
0,True,2024-12-20 17:21:19.514
|
||||||
1,True,2024-12-20 15:17:55.102
|
0,True,2024-12-20 17:22:35.613
|
||||||
3,True,2024-12-20 15:17:55.174
|
1,True,2024-12-20 17:22:35.637
|
||||||
0,True,2024-12-20 15:19:11.256
|
3,True,2024-12-20 17:10:15.329
|
||||||
2,True,2024-12-20 15:19:11.294
|
2,True,2024-12-20 17:10:15.356
|
||||||
3,True,2024-12-20 15:19:11.320
|
1,True,2024-12-20 17:10:15.359
|
||||||
1,True,2024-12-20 15:19:11.336
|
0,True,2024-12-20 17:10:15.389
|
||||||
0,True,2024-12-20 15:20:27.439
|
3,True,2024-12-20 17:11:31.428
|
||||||
1,True,2024-12-20 15:20:27.461
|
0,True,2024-12-20 17:11:31.469
|
||||||
3,True,2024-12-20 15:20:27.465
|
2,True,2024-12-20 17:11:31.511
|
||||||
2,True,2024-12-20 15:20:27.472
|
1,True,2024-12-20 17:11:31.670
|
||||||
3,True,2024-12-20 15:21:43.567
|
0,True,2024-12-20 17:12:47.680
|
||||||
0,True,2024-12-20 15:21:43.592
|
3,True,2024-12-20 17:12:47.753
|
||||||
1,True,2024-12-20 15:21:43.606
|
1,True,2024-12-20 17:12:47.770
|
||||||
2,True,2024-12-20 15:21:43.750
|
2,True,2024-12-20 17:12:47.779
|
||||||
3,True,2024-12-20 15:22:59.818
|
3,True,2024-12-20 17:14:03.844
|
||||||
2,True,2024-12-20 15:22:59.825
|
1,True,2024-12-20 17:14:03.847
|
||||||
0,True,2024-12-20 15:22:59.844
|
2,True,2024-12-20 17:14:03.883
|
||||||
1,True,2024-12-20 15:22:59.853
|
0,True,2024-12-20 17:14:03.977
|
||||||
2,True,2024-12-20 15:24:15.971
|
3,True,2024-12-20 17:15:20.026
|
||||||
3,True,2024-12-20 15:24:15.976
|
0,True,2024-12-20 17:15:20.069
|
||||||
0,True,2024-12-20 15:24:16.035
|
1,True,2024-12-20 17:15:20.071
|
||||||
1,True,2024-12-20 15:24:16.099
|
2,True,2024-12-20 17:15:20.127
|
||||||
2,True,2024-12-20 15:25:32.202
|
0,True,2024-12-20 17:16:36.155
|
||||||
0,True,2024-12-20 15:25:32.223
|
1,True,2024-12-20 17:16:36.166
|
||||||
3,True,2024-12-20 15:25:32.276
|
3,True,2024-12-20 17:16:36.217
|
||||||
1,True,2024-12-20 15:25:32.334
|
2,True,2024-12-20 17:16:36.248
|
||||||
3,True,2024-12-20 15:26:48.410
|
3,True,2024-12-20 17:17:52.320
|
||||||
0,True,2024-12-20 15:26:48.449
|
2,True,2024-12-20 17:17:52.357
|
||||||
1,True,2024-12-20 15:26:48.504
|
0,True,2024-12-20 17:17:52.401
|
||||||
2,True,2024-12-20 15:26:48.540
|
1,True,2024-12-20 17:17:52.477
|
||||||
3,True,2024-12-20 15:28:04.604
|
1,True,2024-12-20 17:19:08.543
|
||||||
0,True,2024-12-20 15:28:04.604
|
3,True,2024-12-20 17:19:08.553
|
||||||
2,True,2024-12-20 15:28:04.614
|
2,True,2024-12-20 17:19:08.578
|
||||||
1,True,2024-12-20 15:28:04.648
|
0,True,2024-12-20 17:19:08.656
|
||||||
|
|||||||
|
Reference in New Issue
Block a user