Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ user_role = "user"
|
|
48 |
tts_model = TTS(language="EN_NEWEST", device="auto")
|
49 |
speaker_id = tts_model.hps.data.spk2id["EN-Newest"]
|
50 |
blocksize = 512
|
51 |
-
transcriber = pipeline("automatic-speech-recognition", model="
|
52 |
def int2float(sound):
|
53 |
"""
|
54 |
Taken from https://github.com/snakers4/silero-vad
|
@@ -71,7 +71,7 @@ max_speech_ms=float("inf")
|
|
71 |
# "distil-whisper/distil-large-v3",
|
72 |
# torch_dtype="float16",
|
73 |
# ).to("cpu")
|
74 |
-
LM_tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM-
|
75 |
LM_model = AutoModelForCausalLM.from_pretrained(
|
76 |
"HuggingFaceTB/SmolLM-360M-Instruct", torch_dtype="float16", trust_remote_code=True
|
77 |
).to("cpu")
|
|
|
48 |
tts_model = TTS(language="EN_NEWEST", device="auto")
|
49 |
speaker_id = tts_model.hps.data.spk2id["EN-Newest"]
|
50 |
blocksize = 512
|
51 |
+
transcriber = pipeline("automatic-speech-recognition", model="openai/whisper-tiny.en")
|
52 |
def int2float(sound):
|
53 |
"""
|
54 |
Taken from https://github.com/snakers4/silero-vad
|
|
|
71 |
# "distil-whisper/distil-large-v3",
|
72 |
# torch_dtype="float16",
|
73 |
# ).to("cpu")
|
74 |
+
LM_tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM-135M-Instruct")
|
75 |
LM_model = AutoModelForCausalLM.from_pretrained(
|
76 |
"HuggingFaceTB/SmolLM-360M-Instruct", torch_dtype="float16", trust_remote_code=True
|
77 |
).to("cpu")
|