bachvudinh commited on
Commit
313ab2a
·
1 Parent(s): 4ed25fe
Files changed (1) hide show
  1. app.py +0 -3
app.py CHANGED
@@ -2,7 +2,6 @@ import gradio as gr
2
  import torch
3
  import spaces
4
  import torchaudio
5
- from encodec import EncodecModel
6
  from whisperspeech.vq_stoks import RQBottleneckTransformer
7
  from encodec.utils import convert_audio
8
  from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, pipeline
@@ -64,8 +63,6 @@ def audio_to_sound_tokens_whisperspeech_transcribe(audio_path):
64
  # print(tokenizer.encode("<|sound_0001|>", add_special_tokens=False))# return the audio tensor
65
  # print(tokenizer.eos_token)
66
 
67
-
68
- @spaces.GPU
69
  def text_to_audio_file(text):
70
  # gen a random id for the audio file
71
  id = str(uuid.uuid4())
 
2
  import torch
3
  import spaces
4
  import torchaudio
 
5
  from whisperspeech.vq_stoks import RQBottleneckTransformer
6
  from encodec.utils import convert_audio
7
  from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, pipeline
 
63
  # print(tokenizer.encode("<|sound_0001|>", add_special_tokens=False))# return the audio tensor
64
  # print(tokenizer.eos_token)
65
 
 
 
66
  def text_to_audio_file(text):
67
  # gen a random id for the audio file
68
  id = str(uuid.uuid4())