amir22010 commited on
Commit
66d3d20
·
verified ·
1 Parent(s): a35d006

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
2
  from llama_cpp import Llama
3
  import os
4
  from groq import Groq
 
5
 
6
  #tts
7
  from balacoon_tts import TTS
@@ -46,7 +47,7 @@ def text_to_speech(text):
46
  with tempfile.NamedTemporaryFile(delete=False, suffix='.wav') as temp_file:
47
  with locker:
48
  audio_data = tts.synthesize(text, "92")
49
- temp_file.write(audio_data.ascontiguousarray())
50
  return temp_file.name
51
 
52
  def combine_audio_files(audio_files):
 
2
  from llama_cpp import Llama
3
  import os
4
  from groq import Groq
5
+ import numpy as np
6
 
7
  #tts
8
  from balacoon_tts import TTS
 
47
  with tempfile.NamedTemporaryFile(delete=False, suffix='.wav') as temp_file:
48
  with locker:
49
  audio_data = tts.synthesize(text, "92")
50
+ temp_file.write(np.ascontiguousarray(audio_data))
51
  return temp_file.name
52
 
53
  def combine_audio_files(audio_files):