mirror of
https://github.com/neonbjb/tortoise-tts.git
synced 2026-03-10 07:23:48 +01:00
Add AI voice assistant and Armaan voice data; update TTS core and dependencies
- Added `ai_voice_assistant.py` for new assistant functionality - Updated `requirements.txt` and `setup.py` for new dependencies - Enhanced `tortoise/do_tts.py` with improvements - Added new Armaan voice samples and model files in
This commit is contained in:
parent
8a2563ecab
commit
726682cd3f
23
ai_voice_assistant.py
Normal file
23
ai_voice_assistant.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import subprocess
|
||||
from playsound import playsound
|
||||
import os
|
||||
|
||||
def get_ai_response(prompt):
|
||||
# Replace this later with LLaMA integration
|
||||
return f"Echo: {prompt}"
|
||||
|
||||
def generate_voice(text):
|
||||
subprocess.run(f'python tortoise/do_tts.py --text "{text}" --voice random', shell=True)
|
||||
|
||||
def play_response():
|
||||
playsound("tortoise/results/generated_audio.wav")
|
||||
|
||||
if __name__ == "__main__":
|
||||
while True:
|
||||
user_input = input("\nYou: ")
|
||||
if user_input.lower() == "exit":
|
||||
break
|
||||
response = get_ai_response(user_input)
|
||||
print("AI:", response)
|
||||
generate_voice(response)
|
||||
play_response()
|
||||
|
|
@ -18,7 +18,7 @@ appdirs
|
|||
nbconvert==5.3.1
|
||||
tornado==4.2
|
||||
pydantic==1.9.1
|
||||
deepspeed==0.8.3
|
||||
#deepspeed==0.17.0
|
||||
py-cpuinfo
|
||||
hjson
|
||||
psutil
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -28,7 +28,7 @@ setuptools.setup(
|
|||
'scipy',
|
||||
'librosa',
|
||||
'transformers==4.31.0',
|
||||
'tokenizers==0.14.0',
|
||||
'tokenizers==0.13.0',
|
||||
'scipy==1.13.1'
|
||||
# 'deepspeed==0.8.3',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import os
|
|||
import torch
|
||||
import torchaudio
|
||||
|
||||
from api import TextToSpeech, MODELS_DIR
|
||||
from utils.audio import load_voices
|
||||
from tortoise.api import TextToSpeech, MODELS_DIR
|
||||
from tortoise.utils.audio import load_voice, load_voices
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
|
|
|
|||
BIN
tortoise/voices/armaan/1.wav
Normal file
BIN
tortoise/voices/armaan/1.wav
Normal file
Binary file not shown.
BIN
tortoise/voices/armaan/2.wav
Normal file
BIN
tortoise/voices/armaan/2.wav
Normal file
Binary file not shown.
BIN
tortoise/voices/armaan/3.wav
Normal file
BIN
tortoise/voices/armaan/3.wav
Normal file
Binary file not shown.
BIN
tortoise/voices/armaan/4.wav
Normal file
BIN
tortoise/voices/armaan/4.wav
Normal file
Binary file not shown.
BIN
tortoise/voices/armaan/5.wav
Normal file
BIN
tortoise/voices/armaan/5.wav
Normal file
Binary file not shown.
BIN
tortoise/voices/armaan/armaan.pth
Normal file
BIN
tortoise/voices/armaan/armaan.pth
Normal file
Binary file not shown.
Loading…
Reference in a new issue