diff --git a/TTS/pyttsx.py b/TTS/pyttsx.py index 0e6d3bb..ae5d3a9 100644 --- a/TTS/pyttsx.py +++ b/TTS/pyttsx.py @@ -21,7 +21,7 @@ class pyttsx: ): voice_id = int(settings.config["settings"]["tts"]["python_voice"]) voice_num = int(settings.config["settings"]["tts"]["python_voice_number"]) - for i in range(voice_num): + for i in range(voice_num-1): self.voices.append(i) i=+1 if random_voice: diff --git a/utils/.config.template.toml b/utils/.config.template.toml index 20a163a..fe377fe 100644 --- a/utils/.config.template.toml +++ b/utils/.config.template.toml @@ -35,5 +35,5 @@ voice_choice = { optional = false, default = "", options = ["streamlabspolly", " aws_polly_voice = { optional = false, default = "Matthew", example = "Matthew", explanation = "The voice used for AWS Polly" } streamlabs_polly_voice = { optional = false, default = "Matthew", example = "Matthew", explanation = "The voice used for Streamlabs Polly" } tiktok_voice = { optional = false, default = "en_us_006", example = "en_us_006", explanation = "The voice used for TikTok TTS" } -python_voice = {optional = false, default = "1", example = "1", explanation = "The index of the system tts voices (can be downloaded externally, run ptt.py to find value)"} +python_voice = {optional = false, default = "1", example = "1", explanation = "The index of the system tts voices (can be downloaded externally, run ptt.py to find value, start from zero)"} python_voice_number = {optional = false, default = "2", example = "2", explanation= "the number of system voices(2 are pre-installed in windows)"} diff --git a/video_creation/data/videos.json b/video_creation/data/videos.json index b851d3e..0637a08 100644 --- a/video_creation/data/videos.json +++ b/video_creation/data/videos.json @@ -1,18 +1 @@ -[ - { - "subreddit": "tifu", - "id": "w97htn", - "time": "1658942748", - "background_credit": "Achy Gaming", - "reddit_title": "TIFU by refusing to give tea to a Chinese senator", - "filename": "TIFU by refusing to give tea to a Chinese senator.mp4" - }, - { - "subreddit": "tifu", - "id": "w9iqby", - "time": "1658945240", - "background_credit": "Achy Gaming", - "reddit_title": "TIFU by giving my boss a RedBull", - "filename": "TIFU by giving my boss a RedBull.mp4" - } -] \ No newline at end of file +[] \ No newline at end of file diff --git a/video_creation/voices.py b/video_creation/voices.py index 2a82b27..b4e6216 100644 --- a/video_creation/voices.py +++ b/video_creation/voices.py @@ -3,7 +3,6 @@ from typing import Dict, Tuple from rich.console import Console -from TTS import pyttsx from TTS.engine_wrapper import TTSEngine from TTS.GTTS import GTTS