Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
d380225
1
Parent(s):
313ab2a
debug
Browse files
app.py
CHANGED
@@ -20,7 +20,6 @@ vq_model = RQBottleneckTransformer.load_model(
|
|
20 |
"whisper-vq-stoks-medium-en+pl-fixed.model"
|
21 |
).to(device)
|
22 |
# tts = TTSProcessor('cpu')
|
23 |
-
tts = TTSProcessor("cpu")
|
24 |
use_8bit = False
|
25 |
llm_path = "homebrewltd/Llama3.1-s-instruct-2024-08-19-epoch-3"
|
26 |
tokenizer = AutoTokenizer.from_pretrained(llm_path)
|
@@ -72,6 +71,7 @@ def text_to_audio_file(text):
|
|
72 |
# remove the last character if it is a period
|
73 |
if text_split[-1] == ".":
|
74 |
text_split = text_split[:-1]
|
|
|
75 |
tts.convert_text_to_audio_file(text, temp_file)
|
76 |
# logging.info(f"Saving audio to {temp_file}")
|
77 |
# torchaudio.save(temp_file, audio.cpu(), sample_rate=24000)
|
|
|
20 |
"whisper-vq-stoks-medium-en+pl-fixed.model"
|
21 |
).to(device)
|
22 |
# tts = TTSProcessor('cpu')
|
|
|
23 |
use_8bit = False
|
24 |
llm_path = "homebrewltd/Llama3.1-s-instruct-2024-08-19-epoch-3"
|
25 |
tokenizer = AutoTokenizer.from_pretrained(llm_path)
|
|
|
71 |
# remove the last character if it is a period
|
72 |
if text_split[-1] == ".":
|
73 |
text_split = text_split[:-1]
|
74 |
+
tts = TTSProcessor("cuda")
|
75 |
tts.convert_text_to_audio_file(text, temp_file)
|
76 |
# logging.info(f"Saving audio to {temp_file}")
|
77 |
# torchaudio.save(temp_file, audio.cpu(), sample_rate=24000)
|