gnosticdev commited on
Commit
2b097e8
·
verified ·
1 Parent(s): 8bffa53

Update conver.py

Browse files
Files changed (1) hide show
  1. conver.py +4 -4
conver.py CHANGED
@@ -76,10 +76,10 @@ class URLToAudioConverter:
76
  raise RuntimeError(f"Failed to parse dialogue: {str(e)}")
77
 
78
  async def text_to_speech(self, conversation_json: Dict, voice_1: str, voice_2: str) -> Tuple[List[str], str]:
79
- output_dir = Path(self._create_output_directory())
80
- filenames = []
81
- try:
82
- if not conversation_json["conversation"]:
83
  raise ValueError("No conversation data to process")
84
  for i, turn in enumerate(conversation_json["conversation"]):
85
  filename = output_dir / f"segment_{i}.mp3"
 
76
  raise RuntimeError(f"Failed to parse dialogue: {str(e)}")
77
 
78
  async def text_to_speech(self, conversation_json: Dict, voice_1: str, voice_2: str) -> Tuple[List[str], str]:
79
+ output_dir = Path(self._create_output_directory())
80
+ filenames = []
81
+ try:
82
+ if not conversation_json["conversation"]:
83
  raise ValueError("No conversation data to process")
84
  for i, turn in enumerate(conversation_json["conversation"]):
85
  filename = output_dir / f"segment_{i}.mp3"