This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
forked from shelbynl/TTS-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Thaddeus Thomas edited this page Mar 2, 2023
·
1 revision
Welcome to the TTS-project wiki! Text to Speech in Azure Cloud
Some of the changes I made include:
- Eliminating the
os.path
andsys
imports since they are not used. - Combining the
MSG
andTITLE
variables into a single line for readability. - Moving the
KEY
andREGION
environment variable retrievals to the top of the file. - Removing the redundant
easygui.msgbox()
call. - Simplifying the
main()
function by using a loop to prompt the user for their choice until they choose to exit,
and removing thePath
import andreturn path
statement since they are not used. - Separating the
get_directory()
,get_save_file_path()
, andget_open_file_path()
functions to make the code easier to read and maintain. - Refactoring the
load_credentials()
function to reduce redundancy and make it more concise. - Combining the
initialize_speech_config()
andsynthesize_text()
functions since they are tightly related and their code is relatively short. - Creating a new
save_audio_waveform()
function
To configure SSML (Speech Synthesis Markup Language) rules into a dictionary so that they can be automatically applied when a text-to-speech application starts converting the text into audio.
-
Create a dictionary: The first step is to create a dictionary that contains the SSML rules that you want to apply.
- You can use any programming language to create this dictionary.
-
Map the rules to the input text: Once you have created the dictionary, you need to map the SSML rules to the input text.
- This can be done by using regular expressions or other techniques depending on your programming language.
-
Apply the rules: Once you have mapped the rules to the input text, you can apply the rules by using the SSML markup in your text-to-speech application.
- Most text-to-speech applications support SSML, and you can use the appropriate tags to apply the rules defined in your dictionary.
-
Test and refine: Finally, you should test your application to make sure that the SSML rules are being applied correctly.
- You may need to refine the rules and the mapping based on the results of your testing.
- Dictionary to configure SSML rules could be a powerful way to automate the application of SSML in this applications.
PROJECT_ID = <input pid>
FILE_NAME = <input filename>
export PROJECT_ID=$PROJECT_ID
export FILE_NAME=$FILE_NAME
scripts/dashboard/dashboard.sh import $PROJECT_ID $FILE_NAME
setx | set SPEECH_REGION
setx | set SPEECH_KEY
Folder PATH listing for volume DATA
Volume serial number is 20A2-26C7
D:.
+---.github
| \---ISSUE_TEMPLATE
+---.venv
| +---Include
| +---Lib
| | \---site-packages
| | +---pip
| | | +---_internal
| | | | +---cli
| | | | | \---__pycache__
| | | | +---commands
| | | | | \---__pycache__
| | | | +---distributions
| | | | | \---__pycache__
| | | | +---index
| | | | | \---__pycache__
| | | | +---locations
| | | | | \---__pycache__
| | | | +---metadata
| | | | | +---importlib
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | +---models
| | | | | \---__pycache__
| | | | +---network
| | | | | \---__pycache__
| | | | +---operations
| | | | | +---build
| | | | | | \---__pycache__
| | | | | +---install
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | +---req
| | | | | \---__pycache__
| | | | +---resolution
| | | | | +---legacy
| | | | | | \---__pycache__
| | | | | +---resolvelib
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | +---utils
| | | | | \---__pycache__
| | | | +---vcs
| | | | | \---__pycache__
| | | | \---__pycache__
| | | +---_vendor
| | | | +---cachecontrol
| | | | | +---caches
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | +---certifi
| | | | | \---__pycache__
| | | | +---chardet
| | | | | +---cli
| | | | | | \---__pycache__
| | | | | +---metadata
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | +---colorama
| | | | | +---tests
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | +---distlib
| | | | | \---__pycache__
| | | | +---distro
| | | | | \---__pycache__
| | | | +---idna
| | | | | \---__pycache__
| | | | +---msgpack
| | | | | \---__pycache__
| | | | +---packaging
| | | | | \---__pycache__
| | | | +---pkg_resources
| | | | | \---__pycache__
| | | | +---platformdirs
| | | | | \---__pycache__
| | | | +---pygments
| | | | | +---filters
| | | | | | \---__pycache__
| | | | | +---formatters
| | | | | | \---__pycache__
| | | | | +---lexers
| | | | | | \---__pycache__
| | | | | +---styles
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | +---pyparsing
| | | | | +---diagram
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | +---pyproject_hooks
| | | | | +---_in_process
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | +---requests
| | | | | \---__pycache__
| | | | +---resolvelib
| | | | | +---compat
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | +---rich
| | | | | \---__pycache__
| | | | +---tenacity
| | | | | \---__pycache__
| | | | +---tomli
| | | | | \---__pycache__
| | | | +---urllib3
| | | | | +---contrib
| | | | | | +---_securetransport
| | | | | | | \---__pycache__
| | | | | | \---__pycache__
| | | | | +---packages
| | | | | | +---backports
| | | | | | | \---__pycache__
| | | | | | \---__pycache__
| | | | | +---util
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | +---webencodings
| | | | | \---__pycache__
| | | | \---__pycache__
| | | \---__pycache__
| | +---pip-23.0.1.dist-info
| | +---pkg_resources
| | | +---extern
| | | | \---__pycache__
| | | +---_vendor
| | | | +---importlib_resources
| | | | | \---__pycache__
| | | | +---jaraco
| | | | | +---text
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | +---more_itertools
| | | | | \---__pycache__
| | | | +---packaging
| | | | | \---__pycache__
| | | | +---pyparsing
| | | | | +---diagram
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | \---__pycache__
| | | \---__pycache__
| | +---setuptools
| | | +---command
| | | | \---__pycache__
| | | +---config
| | | | +---_validate_pyproject
| | | | | \---__pycache__
| | | | \---__pycache__
| | | +---extern
| | | | \---__pycache__
| | | +---_distutils
| | | | +---command
| | | | | \---__pycache__
| | | | \---__pycache__
| | | +---_vendor
| | | | +---importlib_metadata
| | | | | \---__pycache__
| | | | +---importlib_resources
| | | | | \---__pycache__
| | | | +---jaraco
| | | | | +---text
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | +---more_itertools
| | | | | \---__pycache__
| | | | +---packaging
| | | | | \---__pycache__
| | | | +---pyparsing
| | | | | +---diagram
| | | | | | \---__pycache__
| | | | | \---__pycache__
| | | | +---tomli
| | | | | \---__pycache__
| | | | \---__pycache__
| | | \---__pycache__
| | +---setuptools-65.5.0.dist-info
| | \---_distutils_hack
| | \---__pycache__
| \---Scripts
+---archive
| \---easy_gui
| +---numpy
| | +---core
| | +---fft
| | +---linalg
| | \---random
| +---PIL
| +---psutil
| +---tcl
| | +---encoding
| | +---http1.0
| | +---msgs
| | +---opt0.4
| | \---tzdata
| | +---Africa
| | +---America
| | | +---Argentina
| | | +---Indiana
| | | +---Kentucky
| | | \---North_Dakota
| | +---Antarctica
| | +---Arctic
| | +---Asia
| | +---Atlantic
| | +---Australia
| | +---Brazil
| | +---Canada
| | +---Chile
| | +---Etc
| | +---Europe
| | +---Indian
| | +---Mexico
| | +---Pacific
| | +---SystemV
| | \---US
| +---tcl8
| | +---8.4
| | | \---platform
| | +---8.5
| | \---8.6
| \---tk
| +---images
| +---msgs
| \---ttk
+---Documentation
+---exe-config
| \---Dependencies
+---output
| \---text-to-speech-class
| +---asyncio
| +---azure
| | \---cognitiveservices
| | \---speech
| +---cffi
| +---concurrent
| | \---futures
| +---ctypes
| | \---macholib
| +---curses
| +---distutils
| | \---command
| +---docutils
| | +---languages
| | +---parsers
| | | \---rst
| | | +---directives
| | | +---include
| | | \---languages
| | +---readers
| | +---transforms
| | +---utils
| | | \---math
| | \---writers
| | +---html4css1
| | +---html5_polyglot
| | +---latex2e
| | +---odf_odt
| | +---pep_html
| | +---s5_html
| | | \---themes
| | | +---big-black
| | | +---big-white
| | | +---default
| | | +---medium-black
| | | +---medium-white
| | | +---small-black
| | | \---small-white
| | \---xetex
| +---easygui
| | \---boxes
| +---email
| +---html
| +---http
| +---importlib
| | +---metadata
| | \---resources
| +---importlib_metadata
| +---importlib_metadata-6.0.0.dist-info
| +---json
| +---logging
| +---multiprocessing
| | \---dummy
| +---numpy
| | +---array_api
| | +---compat
| | +---core
| | +---fft
| | +---lib
| | +---linalg
| | +---ma
| | +---matrixlib
| | +---polynomial
| | +---random
| | +---testing
| | | \---_private
| | +---typing
| | \---_typing
| +---packaging
| +---PIL
| +---pkg_resources
| | +---extern
| | \---_vendor
| | +---importlib_resources
| | +---jaraco
| | | \---text
| | +---more_itertools
| | +---packaging
| | \---platformdirs
| +---platformdirs
| +---psutil
| +---pycparser
| | \---ply
| +---pydoc_data
| +---pygments
| | +---filters
| | +---formatters
| | +---lexers
| | \---styles
| +---setuptools
| | +---command
| | +---config
| | | \---_validate_pyproject
| | +---extern
| | +---_distutils
| | | \---command
| | \---_vendor
| | +---importlib_metadata
| | +---importlib_resources
| | +---jaraco
| | | \---text
| | +---more_itertools
| | +---packaging
| | \---tomli
| +---tcl
| | +---encoding
| | +---http1.0
| | +---msgs
| | +---opt0.4
| | \---tzdata
| | +---Africa
| | +---America
| | | +---Argentina
| | | +---Indiana
| | | +---Kentucky
| | | \---North_Dakota
| | +---Antarctica
| | +---Arctic
| | +---Asia
| | +---Atlantic
| | +---Australia
| | +---Brazil
| | +---Canada
| | +---Chile
| | +---Etc
| | +---Europe
| | +---Indian
| | +---Mexico
| | +---Pacific
| | +---SystemV
| | \---US
| +---tcl8
| | +---8.4
| | | \---platform
| | +---8.5
| | \---8.6
| +---tk
| | +---images
| | +---msgs
| | \---ttk
| +---tkinter
| +---unittest
| +---wheel-0.38.4.dist-info
| +---xml
| | +---dom
| | +---etree
| | +---parsers
| | \---sax
| +---xmlrpc
| +---zipp
| \---_distutils_hack
+---scraper
\---text_to_speech
+---master
\---__pycache__