Help me connect this API to my website using Flask:
1. Install the python client (docs) if you don't already have it installed.

copy
$ pip install gradio_client
2. Find the API endpoint below corresponding to your desired function in the app. Copy the code snippet, replacing the placeholder values with your own input data. If this is a private Space, you may need to pass your Hugging Face token as well (read more). Or use the 
API Recorder

 to automatically generate your API requests.

api_name: /predict
copy
from gradio_client import Client

client = Client("innoai/Edge-TTS-Text-to-Speech")
result = client.predict(
		text="Hello!!",
		voice="",
		rate=0,
		pitch=0,
		api_name="/predict"
)
print(result)
Accepts 4 parameters:
text str Required

The input value that is provided in the "Input Text" Textbox component.

voice Literal['', 'af-ZA-AdriNeural - af-ZA (Female)', 'af-ZA-WillemNeural - af-ZA (Male)', 'sq-AL-AnilaNeural - sq-AL (Female)', 'sq-AL-IlirNeural - sq-AL (Male)', 'am-ET-AmehaNeural - am-ET (Male)', 'am-ET-MekdesNeural - am-ET (Female)', 'ar-DZ-AminaNeural - ar-DZ (Female)', 'ar-DZ-IsmaelNeural - ar-DZ (Male)', 'ar-BH-AliNeural - ar-BH (Male)', 'ar-BH-LailaNeural - ar-BH (Female)', 'ar-EG-SalmaNeural - ar-EG (Female)', 'ar-EG-ShakirNeural - ar-EG (Male)', 'ar-IQ-BasselNeural - ar-IQ (Male)', 'ar-IQ-RanaNeural - ar-IQ (Female)', 'ar-JO-SanaNeural - ar-JO (Female)', 'ar-JO-TaimNeural - ar-JO (Male)', 'ar-KW-FahedNeural - ar-KW (Male)', 'ar-KW-NouraNeural - ar-KW (Female)', 'ar-LB-LaylaNeural - ar-LB (Female)', 'ar-LB-RamiNeural - ar-LB (Male)', 'ar-LY-ImanNeural - ar-LY (Female)', 'ar-LY-OmarNeural - ar-LY (Male)', 'ar-MA-JamalNeural - ar-MA (Male)', 'ar-MA-MounaNeural - ar-MA (Female)', 'ar-OM-AbdullahNeural - ar-OM (Male)', 'ar-OM-AyshaNeural - ar-OM (Female)', 'ar-QA-AmalNeural - ar-QA (Female)', 'ar-QA-MoazNeural - ar-QA (Male)', 'ar-SA-HamedNeural - ar-SA (Male)', 'ar-SA-ZariyahNeural - ar-SA (Female)', 'ar-SY-AmanyNeural - ar-SY (Female)', 'ar-SY-LaithNeural - ar-SY (Male)', 'ar-TN-HediNeural - ar-TN (Male)', 'ar-TN-ReemNeural - ar-TN (Female)', 'ar-AE-FatimaNeural - ar-AE (Female)', 'ar-AE-HamdanNeural - ar-AE (Male)', 'ar-YE-MaryamNeural - ar-YE (Female)', 'ar-YE-SalehNeural - ar-YE (Male)', 'az-AZ-BabekNeural - az-AZ (Male)', 'az-AZ-BanuNeural - az-AZ (Female)', 'bn-BD-NabanitaNeural - bn-BD (Female)', 'bn-BD-PradeepNeural - bn-BD (Male)', 'bn-IN-BashkarNeural - bn-IN (Male)', 'bn-IN-TanishaaNeural - bn-IN (Female)', 'bs-BA-GoranNeural - bs-BA (Male)', 'bs-BA-VesnaNeural - bs-BA (Female)', 'bg-BG-BorislavNeural - bg-BG (Male)', 'bg-BG-KalinaNeural - bg-BG (Female)', 'my-MM-NilarNeural - my-MM (Female)', 'my-MM-ThihaNeural - my-MM (Male)', 'ca-ES-EnricNeural - ca-ES (Male)', 'ca-ES-JoanaNeural - ca-ES (Female)', 'zh-HK-HiuGaaiNeural - zh-HK (Female)', 'zh-HK-HiuMaanNeural - zh-HK (Female)', 'zh-HK-WanLungNeural - zh-HK (Male)', 'zh-CN-XiaoxiaoNeural - zh-CN (Female)', 'zh-CN-XiaoyiNeural - zh-CN (Female)', 'zh-CN-YunjianNeural - zh-CN (Male)', 'zh-CN-YunxiNeural - zh-CN (Male)', 'zh-CN-YunxiaNeural - zh-CN (Male)', 'zh-CN-YunyangNeural - zh-CN (Male)', 'zh-CN-liaoning-XiaobeiNeural - zh-CN-liaoning (Female)', 'zh-TW-HsiaoChenNeural - zh-TW (Female)', 'zh-TW-YunJheNeural - zh-TW (Male)', 'zh-TW-HsiaoYuNeural - zh-TW (Female)', 'zh-CN-shaanxi-XiaoniNeural - zh-CN-shaanxi (Female)', 'hr-HR-GabrijelaNeural - hr-HR (Female)', 'hr-HR-SreckoNeural - hr-HR (Male)', 'cs-CZ-AntoninNeural - cs-CZ (Male)', 'cs-CZ-VlastaNeural - cs-CZ (Female)', 'da-DK-ChristelNeural - da-DK (Female)', 'da-DK-JeppeNeural - da-DK (Male)', 'nl-BE-ArnaudNeural - nl-BE (Male)', 'nl-BE-DenaNeural - nl-BE (Female)', 'nl-NL-ColetteNeural - nl-NL (Female)', 'nl-NL-FennaNeural - nl-NL (Female)', 'nl-NL-MaartenNeural - nl-NL (Male)', 'en-AU-NatashaNeural - en-AU (Female)', 'en-AU-WilliamNeural - en-AU (Male)', 'en-CA-ClaraNeural - en-CA (Female)', 'en-CA-LiamNeural - en-CA (Male)', 'en-HK-SamNeural - en-HK (Male)', 'en-HK-YanNeural - en-HK (Female)', 'en-IN-NeerjaExpressiveNeural - en-IN (Female)', 'en-IN-NeerjaNeural - en-IN (Female)', 'en-IN-PrabhatNeural - en-IN (Male)', 'en-IE-ConnorNeural - en-IE (Male)', 'en-IE-EmilyNeural - en-IE (Female)', 'en-KE-AsiliaNeural - en-KE (Female)', 'en-KE-ChilembaNeural - en-KE (Male)', 'en-NZ-MitchellNeural - en-NZ (Male)', 'en-NZ-MollyNeural - en-NZ (Female)', 'en-NG-AbeoNeural - en-NG (Male)', 'en-NG-EzinneNeural - en-NG (Female)', 'en-PH-JamesNeural - en-PH (Male)', 'en-PH-RosaNeural - en-PH (Female)', 'en-SG-LunaNeural - en-SG (Female)', 'en-SG-WayneNeural - en-SG (Male)', 'en-ZA-LeahNeural - en-ZA (Female)', 'en-ZA-LukeNeural - en-ZA (Male)', 'en-TZ-ElimuNeural - en-TZ (Male)', 'en-TZ-ImaniNeural - en-TZ (Female)', 'en-GB-LibbyNeural - en-GB (Female)', 'en-GB-MaisieNeural - en-GB (Female)', 'en-GB-RyanNeural - en-GB (Male)', 'en-GB-SoniaNeural - en-GB (Female)', 'en-GB-ThomasNeural - en-GB (Male)', 'en-US-AvaMultilingualNeural - en-US (Female)', 'en-US-AndrewMultilingualNeural - en-US (Male)', 'en-US-EmmaMultilingualNeural - en-US (Female)', 'en-US-BrianMultilingualNeural - en-US (Male)', 'en-US-AvaNeural - en-US (Female)', 'en-US-AndrewNeural - en-US (Male)', 'en-US-EmmaNeural - en-US (Female)', 'en-US-BrianNeural - en-US (Male)', 'en-US-AnaNeural - en-US (Female)', 'en-US-AriaNeural - en-US (Female)', 'en-US-ChristopherNeural - en-US (Male)', 'en-US-EricNeural - en-US (Male)', 'en-US-GuyNeural - en-US (Male)', 'en-US-JennyNeural - en-US (Female)', 'en-US-MichelleNeural - en-US (Female)', 'en-US-RogerNeural - en-US (Male)', 'en-US-SteffanNeural - en-US (Male)', 'et-EE-AnuNeural - et-EE (Female)', 'et-EE-KertNeural - et-EE (Male)', 'fil-PH-AngeloNeural - fil-PH (Male)', 'fil-PH-BlessicaNeural - fil-PH (Female)', 'fi-FI-HarriNeural - fi-FI (Male)', 'fi-FI-NooraNeural - fi-FI (Female)', 'fr-BE-CharlineNeural - fr-BE (Female)', 'fr-BE-GerardNeural - fr-BE (Male)', 'fr-CA-ThierryNeural - fr-CA (Male)', 'fr-CA-AntoineNeural - fr-CA (Male)', 'fr-CA-JeanNeural - fr-CA (Male)', 'fr-CA-SylvieNeural - fr-CA (Female)', 'fr-FR-VivienneMultilingualNeural - fr-FR (Female)', 'fr-FR-RemyMultilingualNeural - fr-FR (Male)', 'fr-FR-DeniseNeural - fr-FR (Female)', 'fr-FR-EloiseNeural - fr-FR (Female)', 'fr-FR-HenriNeural - fr-FR (Male)', 'fr-CH-ArianeNeural - fr-CH (Female)', 'fr-CH-FabriceNeural - fr-CH (Male)', 'gl-ES-RoiNeural - gl-ES (Male)', 'gl-ES-SabelaNeural - gl-ES (Female)', 'ka-GE-EkaNeural - ka-GE (Female)', 'ka-GE-GiorgiNeural - ka-GE (Male)', 'de-AT-IngridNeural - de-AT (Female)', 'de-AT-JonasNeural - de-AT (Male)', 'de-DE-SeraphinaMultilingualNeural - de-DE (Female)', 'de-DE-FlorianMultilingualNeural - de-DE (Male)', 'de-DE-AmalaNeural - de-DE (Female)', 'de-DE-ConradNeural - de-DE (Male)', 'de-DE-KatjaNeural - de-DE (Female)', 'de-DE-KillianNeural - de-DE (Male)', 'de-CH-JanNeural - de-CH (Male)', 'de-CH-LeniNeural - de-CH (Female)', 'el-GR-AthinaNeural - el-GR (Female)', 'el-GR-NestorasNeural - el-GR (Male)', 'gu-IN-DhwaniNeural - gu-IN (Female)', 'gu-IN-NiranjanNeural - gu-IN (Male)', 'he-IL-AvriNeural - he-IL (Male)', 'he-IL-HilaNeural - he-IL (Female)', 'hi-IN-MadhurNeural - hi-IN (Male)', 'hi-IN-SwaraNeural - hi-IN (Female)', 'hu-HU-NoemiNeural - hu-HU (Female)', 'hu-HU-TamasNeural - hu-HU (Male)', 'is-IS-GudrunNeural - is-IS (Female)', 'is-IS-GunnarNeural - is-IS (Male)', 'id-ID-ArdiNeural - id-ID (Male)', 'id-ID-GadisNeural - id-ID (Female)', 'ga-IE-ColmNeural - ga-IE (Male)', 'ga-IE-OrlaNeural - ga-IE (Female)', 'it-IT-GiuseppeNeural - it-IT (Male)', 'it-IT-DiegoNeural - it-IT (Male)', 'it-IT-ElsaNeural - it-IT (Female)', 'it-IT-IsabellaNeural - it-IT (Female)', 'ja-JP-KeitaNeural - ja-JP (Male)', 'ja-JP-NanamiNeural - ja-JP (Female)', 'jv-ID-DimasNeural - jv-ID (Male)', 'jv-ID-SitiNeural - jv-ID (Female)', 'kn-IN-GaganNeural - kn-IN (Male)', 'kn-IN-SapnaNeural - kn-IN (Female)', 'kk-KZ-AigulNeural - kk-KZ (Female)', 'kk-KZ-DauletNeural - kk-KZ (Male)', 'km-KH-PisethNeural - km-KH (Male)', 'km-KH-SreymomNeural - km-KH (Female)', 'ko-KR-HyunsuNeural - ko-KR (Male)', 'ko-KR-InJoonNeural - ko-KR (Male)', 'ko-KR-SunHiNeural - ko-KR (Female)', 'lo-LA-ChanthavongNeural - lo-LA (Male)', 'lo-LA-KeomanyNeural - lo-LA (Female)', 'lv-LV-EveritaNeural - lv-LV (Female)', 'lv-LV-NilsNeural - lv-LV (Male)', 'lt-LT-LeonasNeural - lt-LT (Male)', 'lt-LT-OnaNeural - lt-LT (Female)', 'mk-MK-AleksandarNeural - mk-MK (Male)', 'mk-MK-MarijaNeural - mk-MK (Female)', 'ms-MY-OsmanNeural - ms-MY (Male)', 'ms-MY-YasminNeural - ms-MY (Female)', 'ml-IN-MidhunNeural - ml-IN (Male)', 'ml-IN-SobhanaNeural - ml-IN (Female)', 'mt-MT-GraceNeural - mt-MT (Female)', 'mt-MT-JosephNeural - mt-MT (Male)', 'mr-IN-AarohiNeural - mr-IN (Female)', 'mr-IN-ManoharNeural - mr-IN (Male)', 'mn-MN-BataaNeural - mn-MN (Male)', 'mn-MN-YesuiNeural - mn-MN (Female)', 'ne-NP-HemkalaNeural - ne-NP (Female)', 'ne-NP-SagarNeural - ne-NP (Male)', 'nb-NO-FinnNeural - nb-NO (Male)', 'nb-NO-PernilleNeural - nb-NO (Female)', 'ps-AF-GulNawazNeural - ps-AF (Male)', 'ps-AF-LatifaNeural - ps-AF (Female)', 'fa-IR-DilaraNeural - fa-IR (Female)', 'fa-IR-FaridNeural - fa-IR (Male)', 'pl-PL-MarekNeural - pl-PL (Male)', 'pl-PL-ZofiaNeural - pl-PL (Female)', 'pt-BR-ThalitaNeural - pt-BR (Female)', 'pt-BR-AntonioNeural - pt-BR (Male)', 'pt-BR-FranciscaNeural - pt-BR (Female)', 'pt-PT-DuarteNeural - pt-PT (Male)', 'pt-PT-RaquelNeural - pt-PT (Female)', 'ro-RO-AlinaNeural - ro-RO (Female)', 'ro-RO-EmilNeural - ro-RO (Male)', 'ru-RU-DmitryNeural - ru-RU (Male)', 'ru-RU-SvetlanaNeural - ru-RU (Female)', 'sr-RS-NicholasNeural - sr-RS (Male)', 'sr-RS-SophieNeural - sr-RS (Female)', 'si-LK-SameeraNeural - si-LK (Male)', 'si-LK-ThiliniNeural - si-LK (Female)', 'sk-SK-LukasNeural - sk-SK (Male)', 'sk-SK-ViktoriaNeural - sk-SK (Female)', 'sl-SI-PetraNeural - sl-SI (Female)', 'sl-SI-RokNeural - sl-SI (Male)', 'so-SO-MuuseNeural - so-SO (Male)', 'so-SO-UbaxNeural - so-SO (Female)', 'es-AR-ElenaNeural - es-AR (Female)', 'es-AR-TomasNeural - es-AR (Male)', 'es-BO-MarceloNeural - es-BO (Male)', 'es-BO-SofiaNeural - es-BO (Female)', 'es-CL-CatalinaNeural - es-CL (Female)', 'es-CL-LorenzoNeural - es-CL (Male)', 'es-ES-XimenaNeural - es-ES (Female)', 'es-CO-GonzaloNeural - es-CO (Male)', 'es-CO-SalomeNeural - es-CO (Female)', 'es-CR-JuanNeural - es-CR (Male)', 'es-CR-MariaNeural - es-CR (Female)', 'es-CU-BelkysNeural - es-CU (Female)', 'es-CU-ManuelNeural - es-CU (Male)', 'es-DO-EmilioNeural - es-DO (Male)', 'es-DO-RamonaNeural - es-DO (Female)', 'es-EC-AndreaNeural - es-EC (Female)', 'es-EC-LuisNeural - es-EC (Male)', 'es-SV-LorenaNeural - es-SV (Female)', 'es-SV-RodrigoNeural - es-SV (Male)', 'es-GQ-JavierNeural - es-GQ (Male)', 'es-GQ-TeresaNeural - es-GQ (Female)', 'es-GT-AndresNeural - es-GT (Male)', 'es-GT-MartaNeural - es-GT (Female)', 'es-HN-CarlosNeural - es-HN (Male)', 'es-HN-KarlaNeural - es-HN (Female)', 'es-MX-DaliaNeural - es-MX (Female)', 'es-MX-JorgeNeural - es-MX (Male)', 'es-NI-FedericoNeural - es-NI (Male)', 'es-NI-YolandaNeural - es-NI (Female)', 'es-PA-MargaritaNeural - es-PA (Female)', 'es-PA-RobertoNeural - es-PA (Male)', 'es-PY-MarioNeural - es-PY (Male)', 'es-PY-TaniaNeural - es-PY (Female)', 'es-PE-AlexNeural - es-PE (Male)', 'es-PE-CamilaNeural - es-PE (Female)', 'es-PR-KarinaNeural - es-PR (Female)', 'es-PR-VictorNeural - es-PR (Male)', 'es-ES-AlvaroNeural - es-ES (Male)', 'es-ES-ElviraNeural - es-ES (Female)', 'es-US-AlonsoNeural - es-US (Male)', 'es-US-PalomaNeural - es-US (Female)', 'es-UY-MateoNeural - es-UY (Male)', 'es-UY-ValentinaNeural - es-UY (Female)', 'es-VE-PaolaNeural - es-VE (Female)', 'es-VE-SebastianNeural - es-VE (Male)', 'su-ID-JajangNeural - su-ID (Male)', 'su-ID-TutiNeural - su-ID (Female)', 'sw-KE-RafikiNeural - sw-KE (Male)', 'sw-KE-ZuriNeural - sw-KE (Female)', 'sw-TZ-DaudiNeural - sw-TZ (Male)', 'sw-TZ-RehemaNeural - sw-TZ (Female)', 'sv-SE-MattiasNeural - sv-SE (Male)', 'sv-SE-SofieNeural - sv-SE (Female)', 'ta-IN-PallaviNeural - ta-IN (Female)', 'ta-IN-ValluvarNeural - ta-IN (Male)', 'ta-MY-KaniNeural - ta-MY (Female)', 'ta-MY-SuryaNeural - ta-MY (Male)', 'ta-SG-AnbuNeural - ta-SG (Male)', 'ta-SG-VenbaNeural - ta-SG (Female)', 'ta-LK-KumarNeural - ta-LK (Male)', 'ta-LK-SaranyaNeural - ta-LK (Female)', 'te-IN-MohanNeural - te-IN (Male)', 'te-IN-ShrutiNeural - te-IN (Female)', 'th-TH-NiwatNeural - th-TH (Male)', 'th-TH-PremwadeeNeural - th-TH (Female)', 'tr-TR-AhmetNeural - tr-TR (Male)', 'tr-TR-EmelNeural - tr-TR (Female)', 'uk-UA-OstapNeural - uk-UA (Male)', 'uk-UA-PolinaNeural - uk-UA (Female)', 'ur-IN-GulNeural - ur-IN (Female)', 'ur-IN-SalmanNeural - ur-IN (Male)', 'ur-PK-AsadNeural - ur-PK (Male)', 'ur-PK-UzmaNeural - ur-PK (Female)', 'uz-UZ-MadinaNeural - uz-UZ (Female)', 'uz-UZ-SardorNeural - uz-UZ (Male)', 'vi-VN-HoaiMyNeural - vi-VN (Female)', 'vi-VN-NamMinhNeural - vi-VN (Male)', 'cy-GB-AledNeural - cy-GB (Male)', 'cy-GB-NiaNeural - cy-GB (Female)', 'zu-ZA-ThandoNeural - zu-ZA (Female)', 'zu-ZA-ThembaNeural - zu-ZA (Male)'] Default: ""

The input value that is provided in the "Select Voice" Dropdown component.

rate float Default: 0

The input value that is provided in the "Speech Rate Adjustment (%)" Slider component.

pitch float Default: 0

The input value that is provided in the "Pitch Adjustment (Hz)" Slider component.

Returns tuple of 2 elements
[0] filepath

The output value that appears in the "Generated Audio" Audio component.

[1] str

The output value that appears in the "Warning" Markdown component.

Provide full code with app.py and index.html and guide how to setup the project