Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all servers are now on v2 #10

Merged
merged 1 commit into from
Dec 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions ovos_tts_plugin_server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@


class OVOSServerTTS(TTS):
public_servers_v2 = [
"https://tts.smartgic.io/piper"
]
public_servers = [
"https://pipertts.ziggyai.online",
"https://tts.smartgic.io/piper"
Expand All @@ -16,7 +13,7 @@ def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs, audio_ext="wav",
validator=OVOSServerTTSValidator(self))
self.host = self.config.get("host", None)
self.v2 = self.config.get("v2", False)
self.v2 = self.config.get("v2", self.host is None) # if using public servers, default to v2, else v1

def get_tts(self, sentence, wav_file, lang=None, voice=None):
lang = lang or self.lang
Expand All @@ -30,10 +27,7 @@ def get_tts(self, sentence, wav_file, lang=None, voice=None):
else:
servers = self.host
else:
if self.v2:
servers = self.public_servers_v2
else:
servers = self.public_servers
servers = self.public_servers
data = self._get_from_servers(params, sentence, servers)
with open(wav_file, "wb") as f:
f.write(data)
Expand Down
Loading