Merge pull request #11 from zhisenyang/master

add proxy
This commit is contained in:
rany 2022-05-23 14:37:01 +03:00 committed by GitHub
commit 1f04a4b238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -214,6 +214,7 @@ class Communicate: # pylint: disable=too-few-public-methods
rate="+0%",
volume="+0%",
customspeak=False,
proxy=None,
): # pylint: disable=too-many-arguments, too-many-locals
"""
Runs the Communicate class.
@ -273,6 +274,7 @@ class Communicate: # pylint: disable=too-few-public-methods
compress=15,
autoclose=True,
autoping=True,
proxy=proxy,
headers={
"Pragma": "no-cache",
"Cache-Control": "no-cache",

View File

@ -39,6 +39,7 @@ async def _tts(args):
args.rate,
args.volume,
customspeak=args.custom_ssml,
proxy=args.proxy,
):
if i[2] is not None:
if not args.write_media:
@ -128,6 +129,10 @@ async def _main():
"--write-subtitles",
help="instead of stderr, send subtitle output to provided file",
)
parser.add_argument(
"--proxy",
help="proxy",
)
args = parser.parse_args()
if args.list_voices: