9 Commits

Author SHA1 Message Date
Dmitrium12 91cd9b02df modify project structure and add download_models.py 2024-05-01 13:35:00 +07:00
Dmitrium12 ba52d86754 Merge pull request 'add_noisereduce' (#2) from add_noisereduce into master
Reviewed-on: #2
2024-05-01 10:38:58 +07:00
Dmitrium12 4a0155413e micro fix 2024-04-30 08:46:16 +07:00
Dmitrium12 6a6efe8dd6 micro fix 2024-04-30 08:46:06 +07:00
Dmitrium12 08b6f95a67 add testing noisereduce 2024-04-30 08:31:33 +07:00
Dmitrium12 d2b60b53c4 add command and add its in ollama functions 2024-04-29 17:58:53 +07:00
Dmitrium12 a7abfe44b4 add linter and test ollama in python 2024-04-29 15:31:01 +07:00
Dmitrium12 3fb31e60ea .gitignore 2024-01-09 22:10:57 +07:00
Dmitrium12 c03811cb87 starting 2024-01-09 22:10:13 +07:00
-31
View File
@@ -1,31 +0,0 @@
import time
import sounddevice as sd
import torch
language = 'ru'
model_id = 'ru_v3'
sample_rate = 48000 # 48000
speaker = 'aidar' # aidar, baya, kseniya, xenia, random
put_accent = True
put_yo = True
device = torch.device('cpu') # cpu или gpu
text = "Хауди Хо, друзья!!!"
model, _ = torch.hub.load(repo_or_dir='snakers4/silero-models',
model='silero_tts',
language=language,
speaker=model_id)
model.to(device)
def va_speak(what: str):
audio = model.apply_tts(text=what + "..",
speaker=speaker,
sample_rate=sample_rate,
put_accent=put_accent,
put_yo=put_yo)
sd.play(audio, sample_rate * 1.05)
time.sleep((len(audio) / sample_rate) + 0.5)
sd.stop()