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

Fix VRender #224

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions FoxDot/lib/Extensions/VRender/Sinsy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import sys
import urllib
import urllib.request

from functools import reduce

Expand All @@ -8,5 +8,4 @@ def download(output,wavPath):
index = text.find('./temp/') + len('./temp/')
text = text[index:index+40].split(".")[0]

testfile = urllib.URLopener()
testfile.retrieve("http://sinsy.sp.nitech.ac.jp/temp/" + text + ".wav", wavPath)
urllib.request.urlretrieve("http://sinsy.sp.nitech.ac.jp/temp/" + text + ".wav", wavPath)
6 changes: 3 additions & 3 deletions FoxDot/lib/Extensions/VRender/VRender.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def renderizeVoice(outputName,lyrics,notes,durations,tempo,scale,sex,foxdot_root
print("Finished voice renderization")

def tokenize(text):
textSyllables = cleanText(text)
return filter(lambda x: len(x) > 0, textSyllables.replace(" ", "-").split("-"))
textSyllables = cleanText(text).replace(" ", "-").split("-")
return {i: v for i, v in enumerate([s for s in textSyllables if s])}

def cleanText(text):

Expand All @@ -51,4 +51,4 @@ def cleanText(text):
for symbol in symbolsToDelete:
text = text.replace(symbol,"")

return text
return text