cnph001 commited on
Commit
0ded5f9
·
verified ·
1 Parent(s): d90ab58

Voice Changes

Browse files

Voice Changes

# Text-to-speech function for a single paragraph
async def paragraph_to_speech(text, voice, rate, pitch):
voice3 ="en-US-BrianMultilingualNeural - en-US (Male)" #good for reading
voice1F ="en-US-EmmaNeural - en-US (Female)"
voice2 = "it-IT-GiuseppeMultilingualNeural - it-IT (Male)"
voice2F = "en-US-JennyNeural - en-US (Female)"
voice1 = "en-AU-WilliamNeural - en-AU (Male)"
voice3F = "en-HK-YanNeural - en-HK (Female)"
voice4 = "en-GB-MaisieNeural - en-GB (Female)" #Child

Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -14,11 +14,11 @@ async def get_voices():
14
 
15
  # Text-to-speech function for a single paragraph
16
  async def paragraph_to_speech(text, voice, rate, pitch):
17
- voice1 ="en-US-RogerNeural - en-US (Male)" #good for reading
18
  voice1F ="en-US-EmmaNeural - en-US (Female)"
19
- voice2 = "en-US-BrianNeural - en-US (Male)"
20
  voice2F = "en-US-JennyNeural - en-US (Female)"
21
- voice3 = "en-AU-WilliamNeural - en-AU (Male)"
22
  voice3F = "en-HK-YanNeural - en-HK (Female)"
23
  voice4 = "en-GB-MaisieNeural - en-GB (Female)" #Child
24
  if not text.strip():
@@ -102,7 +102,7 @@ async def create_demo():
102
  voices = await get_voices()
103
  default_voice = "en-US-AndrewNeural - en-US (Male)" # 👈 Pick one of the available voices
104
  description = """
105
- Default = male, other voices 1F:US_Emma, 2F:US_Jenny, 3F:HK_Jan, 1M:US_Roger, 2M:US_Bryan,3M:AU_William, 1C: Childvoice
106
  Enter your text, select a voice, and adjust the speech rate and pitch.
107
  The application will process your text paragraph by paragraph (separated by two blank lines).
108
  """
 
14
 
15
  # Text-to-speech function for a single paragraph
16
  async def paragraph_to_speech(text, voice, rate, pitch):
17
+ voice3 ="en-US-BrianMultilingualNeural - en-US (Male)" #good for reading
18
  voice1F ="en-US-EmmaNeural - en-US (Female)"
19
+ voice2 = "it-IT-GiuseppeMultilingualNeural - it-IT (Male)"
20
  voice2F = "en-US-JennyNeural - en-US (Female)"
21
+ voice1 = "en-AU-WilliamNeural - en-AU (Male)"
22
  voice3F = "en-HK-YanNeural - en-HK (Female)"
23
  voice4 = "en-GB-MaisieNeural - en-GB (Female)" #Child
24
  if not text.strip():
 
102
  voices = await get_voices()
103
  default_voice = "en-US-AndrewNeural - en-US (Male)" # 👈 Pick one of the available voices
104
  description = """
105
+ Default = male, other voices 1F:US_Emma, 2F:US_Jenny, 3F:HK_Yan, 1M:AU_Will, 2M:IT_Guiseppe,3M:US_Brian, 1C: Childvoice
106
  Enter your text, select a voice, and adjust the speech rate and pitch.
107
  The application will process your text paragraph by paragraph (separated by two blank lines).
108
  """