Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import re
|
|
5 |
import shlex
|
6 |
import tempfile
|
7 |
import subprocess
|
|
|
8 |
|
9 |
def phonemizer(text: str):
|
10 |
|
@@ -68,7 +69,8 @@ def phonemizer_ipa(text: str):
|
|
68 |
return phoneme
|
69 |
|
70 |
def processor(text: str):
|
71 |
-
|
|
|
72 |
|
73 |
iface = gr.Interface(
|
74 |
title="Khmer Phonemizer",
|
|
|
5 |
import shlex
|
6 |
import tempfile
|
7 |
import subprocess
|
8 |
+
import khmercut
|
9 |
|
10 |
def phonemizer(text: str):
|
11 |
|
|
|
69 |
return phoneme
|
70 |
|
71 |
def processor(text: str):
|
72 |
+
tokens = khmercut.tokenize(text)
|
73 |
+
return "".join(map(phonemizer, tokens)), "".join(map(phonemizer_ipa, tokens))
|
74 |
|
75 |
iface = gr.Interface(
|
76 |
title="Khmer Phonemizer",
|