Skip to content

Commit

Permalink
Voice improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Feb 2, 2024
1 parent 76548ab commit 28d1614
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions agixt/extensions/alltalk_tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ class alltalk_tts(Extensions):
def __init__(
self,
USE_ALLTALK_TTS: bool = False,
ALLTALK_URI: str = "http://alltalk-tts:7851",
ALLTALK_VOICE: str = "default",
**kwargs,
):
self.voice = ALLTALK_VOICE
self.ALLTALK_URI = ALLTALK_URI
self.ALLTALK_VOICE = ALLTALK_VOICE
self.USE_ALLTALK_TTS = USE_ALLTALK_TTS
if USE_ALLTALK_TTS:
self.commands = {
Expand All @@ -39,15 +41,15 @@ async def speak_with_alltalk_tts(
)
data = {
"text": text,
"voice": self.voice,
"voice": self.ALLTALK_VOICE,
"language": "en",
"temperature": 0.7,
"repetition_penalty": 10.0,
"output_file": output_file,
"streaming": False,
}
response = requests.post(
"http://alltalk-tts:7851/api/generate",
f"{self.ALLTALK_URI}/api/generate",
json=data,
)
if response.status_code != 200:
Expand Down
4 changes: 2 additions & 2 deletions agixt/extensions/voice_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def __init__(self, WHISPER_MODEL="base.en", **kwargs):
if "conversation_name" in kwargs:
self.conversation_name = kwargs["conversation_name"]
# https://huggingface.co/ggerganov/whisper.cpp
# Models: tiny, tiny.en, base, base.en, small, small.en, medium, medium.en, large, large-v1
if WHISPER_MODEL not in [
"tiny",
"tiny.en",
Expand All @@ -85,8 +84,9 @@ def __init__(self, WHISPER_MODEL="base.en", **kwargs):
"small.en",
"medium",
"medium.en",
"large",
"large-v1",
"large-v2",
"large-v3",
]:
self.WHISPER_MODEL = "base.en"
else:
Expand Down

0 comments on commit 28d1614

Please sign in to comment.