Plachta commited on
Commit
d067c89
1 Parent(s): 9b9ae6e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,7 +5,7 @@ import torch
5
  from torch import nn
6
  from torch.nn import functional as F
7
  from torch.utils.data import DataLoader
8
- import translators as ts
9
 
10
  import commons
11
  import utils
@@ -50,9 +50,9 @@ def infer(text, character, language):
50
  if language == '日本語':
51
  pass
52
  elif language == '简体中文':
53
- text = ts.google(text, from_language='zh', to_language='ja')
54
  elif language == 'English':
55
- text = ts.google(text, from_language='en', to_language='ja')
56
  char_id = int(character.split(':')[0])
57
  stn_tst = get_text(text, hps)
58
  with torch.no_grad():
 
5
  from torch import nn
6
  from torch.nn import functional as F
7
  from torch.utils.data import DataLoader
8
+ import translators.server as tss
9
 
10
  import commons
11
  import utils
 
50
  if language == '日本語':
51
  pass
52
  elif language == '简体中文':
53
+ text = tss.google(text, from_language='zh', to_language='ja')
54
  elif language == 'English':
55
+ text = tss.google(text, from_language='en', to_language='ja')
56
  char_id = int(character.split(':')[0])
57
  stn_tst = get_text(text, hps)
58
  with torch.no_grad():