puzan789 commited on
Commit
cad1ad0
·
1 Parent(s): 96d8e4c
src/pipeline/pipeline.py CHANGED
@@ -1,4 +1,4 @@
1
- from src.services.main import SpeechToText
2
  from src.services.texttotext import ConversationHandler
3
  from src.services.texttospeech import TextToSpeech
4
  from elevenlabs import play
@@ -7,7 +7,7 @@ class Pipeline:
7
  def __init__(self):
8
  self.speech_to_text = SpeechToText()
9
  self.text_to_text=ConversationHandler()
10
- self.text_to_speech_=TextToSpeech()
11
 
12
  def speech_to_text_(self):
13
  transcribed_text = self.speech_to_text.record_and_transcribe()
@@ -18,7 +18,7 @@ class Pipeline:
18
  return response
19
 
20
  async def text_to_speech_(self):
21
- response=await self.text_to_speech_.synthesize(self.text_to_text_())
22
  return response
23
 
24
 
 
1
+ from src.services.speechtotext import SpeechToText
2
  from src.services.texttotext import ConversationHandler
3
  from src.services.texttospeech import TextToSpeech
4
  from elevenlabs import play
 
7
  def __init__(self):
8
  self.speech_to_text = SpeechToText()
9
  self.text_to_text=ConversationHandler()
10
+ self.text_to_speech=TextToSpeech()
11
 
12
  def speech_to_text_(self):
13
  transcribed_text = self.speech_to_text.record_and_transcribe()
 
18
  return response
19
 
20
  async def text_to_speech_(self):
21
+ response=await self.text_to_speech.synthesize(self.text_to_text_())
22
  return response
23
 
24
 
src/services/{main.py → speechtotext.py} RENAMED
File without changes