sohojoe commited on
Commit
9b7ec10
1 Parent(s): 73d75a1

fix type issue

Browse files
ffmpeg_converter_actor.py CHANGED
@@ -47,12 +47,12 @@ class FFMpegConverterActor:
47
  async def push_chunk(self, chunk):
48
  try:
49
  self.input_pipe.write(chunk)
50
- # await self.input_pipe.drain()
51
  except BrokenPipeError:
52
  # If the pipe is broken, restart the process.
53
  await self.start_process()
54
  self.input_pipe.write(chunk)
55
- # await self.input_pipe.drain()
56
 
57
  # def has_processed_all_data(self):
58
  # return self.process.poll() is not None
 
47
  async def push_chunk(self, chunk):
48
  try:
49
  self.input_pipe.write(chunk)
50
+ await self.input_pipe.drain()
51
  except BrokenPipeError:
52
  # If the pipe is broken, restart the process.
53
  await self.start_process()
54
  self.input_pipe.write(chunk)
55
+ await self.input_pipe.drain()
56
 
57
  # def has_processed_all_data(self):
58
  # return self.process.poll() is not None
respond_to_prompt_actor.py CHANGED
@@ -6,6 +6,7 @@ from text_to_speech_service import TextToSpeechService
6
  from chat_service import ChatService
7
  import asyncio
8
  # from ray.actor import ActorHandle
 
9
 
10
  @ray.remote
11
  class PromptToLLMActor:
@@ -78,7 +79,7 @@ class SpeechToSpeakerActor:
78
 
79
  @ray.remote
80
  class SpeechToConverterActor:
81
- def __init__(self, input_queue:Queue, ffmpeg_converter_actor:Queue):
82
  load_dotenv()
83
  self.input_queue = input_queue
84
  self.ffmpeg_converter_actor = ffmpeg_converter_actor
 
6
  from chat_service import ChatService
7
  import asyncio
8
  # from ray.actor import ActorHandle
9
+ from ffmpeg_converter_actor import FFMpegConverterActor
10
 
11
  @ray.remote
12
  class PromptToLLMActor:
 
79
 
80
  @ray.remote
81
  class SpeechToConverterActor:
82
+ def __init__(self, input_queue:Queue, ffmpeg_converter_actor:FFMpegConverterActor):
83
  load_dotenv()
84
  self.input_queue = input_queue
85
  self.ffmpeg_converter_actor = ffmpeg_converter_actor