Skip to content

Commit

Permalink
digit characters handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jnwon committed Dec 23, 2023
1 parent 0865548 commit ec9ceca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion VocaloidTTSansweringYukarinette.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,23 @@ function main(processParam, envParam)
input = string.gsub(input, ',', '')
input = string.gsub(input, '?', '')
input = string.gsub(input, '!', '')
input = string.gsub(input, '0', "よん")
input = string.gsub(input, '1', "いる")
input = string.gsub(input, '2', "")
input = string.gsub(input, '3', "さむ")
input = string.gsub(input, '4', "")
input = string.gsub(input, '5', "")
input = string.gsub(input, '6', "ゆく")
input = string.gsub(input, '7', "ちる")
input = string.gsub(input, '8', "ぱる")
input = string.gsub(input, '9', "")

replaced = ''
for i = 1, string.len(input), 3 do
char = string.sub(input, i, i+2)
if ((string.byte(char) >= string.byte('')) and (string.byte(char) <= string.byte(''))) then
replaced = replaced..k2jmap.map[char]
elseif char == '' or char == '' or char == '' or char == '' then
elseif char == '' or char == '' or char == '' or char == '' or char == '' or char == '' or char == '' or char == '' or char == '' or char == '' or char == '' or char == '' or char == '' or char == '' or char == '' or char == '' then
replaced = replaced..char
end
end
Expand Down
1 change: 1 addition & 0 deletions yukarinette_linker.v2.0.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ def restartServer(window):
if reloading:
print(datetime.now().strftime('%Y-%m-%d %H:%M:%S') + ' Vocaloid Editor window object reloaded.')
reloading = False
time.sleep(0.1)
g = open('input.txt', "r", encoding='UTF-8')
inputData = g.readlines()
g.close()
Expand Down

0 comments on commit ec9ceca

Please sign in to comment.