Created
July 5, 2021 19:54
-
-
Save Dharisd/3e8c54b803440da94218283653c5a70d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
from tts import TTSModel | |
import os | |
import time | |
#import soundfile as sf | |
model_path = "/Users/dharis/projects/tts_demo/male_naail" | |
text = 'ރައްޔިތުންގެ މަޖިލީހުގެ އިދާރާ އިން ކުރިއަށް ގެންދާ "އާސްކް ސްޕީކާ"ގެ މިރޭގެ ޕްރޮގްރާމްގައި ނަޝީދު ވިދާޅުވީ ރާއްޖެ އަށް އެންމެ ރަނގަޅު ވާނީ ބަރުލަމާނީ ނިޒާމު ކަމަށް އަދިވެސް ގަބޫލުފުޅު ކުރައްވާ ކަމަށާއި ނަމަވެސް ރިޔާސީ އިންތިހާބެއް އޮވެއްޖެ ނަމަ އެމްޑީޕީގެ ޕްރައިމަރީގައި އެ މަނިކުފާނު ވާދަކުރައްވާނެ ކަމަށެވެ' | |
tts = TTSModel( | |
os.path.join(model_path, "tts.saved_model"), | |
os.path.join(model_path, "vocoder.saved_model") | |
) | |
for i in range(0,10): | |
print("Generating Audio...") | |
start = time.time() | |
output_wav = tts(text, speed=1) | |
end = time.time() | |
passed = end - start | |
print(f"generated in {passed}") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment