otioss commited on
Commit
6b32a15
·
1 Parent(s): e806c1a

Interface improvement

Browse files
Files changed (2) hide show
  1. accent_gradio.py +14 -17
  2. requirements.txt +1 -3
accent_gradio.py CHANGED
@@ -30,17 +30,12 @@ from models import *
30
  from utils import *
31
  from text_utils import TextCleaner
32
  textclenaer = TextCleaner()
33
-
34
  import phonemizer
35
- from cached_path import cached_path
36
- #from dp.phonemizer import Phonemizer
37
-
38
-
39
 
40
 
41
  # Global values
42
  sample_rate_value=24000
43
- original_voice_path = "original_voice.wav"
44
 
45
  to_mel = torchaudio.transforms.MelSpectrogram(
46
  n_mels=80, n_fft=2048, win_length=1200, hop_length=300)
@@ -225,7 +220,9 @@ def record_speaker(audio):
225
  with gr.Blocks() as demo:
226
  gr.Markdown(""" # AccentCraft
227
  ### Transform your non-native accent into a native North American accent.
228
- *For newcomers, kindly navigate to the "First-Time Users" section by clicking on the designated link.*
 
 
229
  """)
230
  with gr.Accordion("First-Time Users (Click Here):", open=False):
231
  gr.Markdown("""
@@ -264,16 +261,16 @@ with gr.Blocks() as demo:
264
  gr.Markdown(
265
  """
266
  ## Remark:
267
- - Longer sentences yield a more naturally flowing result.
268
- Brief expressions like "Hi" or "How are you" may yield suboptimal outcomes.
269
- - The model might occasionally produce noise or generate random speech.
270
- Consider re-recording or re-running for enhanced clarity and accuracy.
271
- - By utilizing this application, you provide consent for your voice to
272
- be synthesized by pre-trained models.
273
- - If encountering an error, please try re-running or reloading the page.
274
- - This app primarily functions as an educational tool for English learners.
275
- The author does not endorse or support any malicious or misuse of this application.
276
- - The user acknowledges and agrees that the use of the software is at the user's sole risk.
277
  """)
278
 
279
 
 
30
  from utils import *
31
  from text_utils import TextCleaner
32
  textclenaer = TextCleaner()
 
33
  import phonemizer
 
 
 
 
34
 
35
 
36
  # Global values
37
  sample_rate_value=24000
38
+ original_voice_path = "ref_voice.wav"
39
 
40
  to_mel = torchaudio.transforms.MelSpectrogram(
41
  n_mels=80, n_fft=2048, win_length=1200, hop_length=300)
 
220
  with gr.Blocks() as demo:
221
  gr.Markdown(""" # AccentCraft
222
  ### Transform your non-native accent into a native North American accent.
223
+ **This is an educational app designed to transform the speech of a non-native English speaker into a native American accent.**
224
+ **The tool aims to assist learners in accent reduction and pronunciation improvement.**
225
+ **For newcomers, kindly navigate to the *First-Time Users* section by clicking on the designated link.**
226
  """)
227
  with gr.Accordion("First-Time Users (Click Here):", open=False):
228
  gr.Markdown("""
 
261
  gr.Markdown(
262
  """
263
  ## Remark:
264
+ - **Longer sentences yield a more naturally flowing result.
265
+ Brief expressions like "Hi" or "How are you" may yield suboptimal outcomes.**
266
+ - **The model might occasionally produce noise or generate random speech.
267
+ Consider re-recording or re-running for enhanced clarity and accuracy.**
268
+ - **By utilizing this application, you provide consent for your voice to
269
+ be synthesized by pre-trained models.**
270
+ - **If encountering an error, please try re-running or reloading the page.**
271
+ - **This app primarily functions as an educational tool for English learners.
272
+ The author does not endorse or support any malicious or misuse of this application.**
273
+ - **The user acknowledges and agrees that the use of the software is at the user's sole risk.**
274
  """)
275
 
276
 
requirements.txt CHANGED
@@ -18,6 +18,4 @@ git+https://github.com/resemble-ai/monotonic_align.git
18
  gradio
19
  git+https://github.com/openai/whisper.git
20
  scipy
21
- phonemizer
22
- deep-phonemizer
23
- cached-path
 
18
  gradio
19
  git+https://github.com/openai/whisper.git
20
  scipy
21
+ phonemizer