4
pylintrc
4
pylintrc
@@ -307,8 +307,8 @@ min-public-methods=2
|
||||
[EXCEPTIONS]
|
||||
|
||||
# Exceptions that will emit a warning when caught.
|
||||
overgeneral-exceptions=BaseException,
|
||||
Exception
|
||||
overgeneral-exceptions=builtins.BaseException,
|
||||
builtins.Exception
|
||||
|
||||
|
||||
[FORMAT]
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Communicate package.
|
||||
"""
|
||||
|
||||
|
||||
import json
|
||||
import re
|
||||
import ssl
|
||||
@@ -152,7 +151,9 @@ def split_text_by_byte_length(
|
||||
yield new_text
|
||||
|
||||
|
||||
def mkssml(text: Union[str, bytes], voice: str, rate: str, volume: str, pitch: str) -> str:
|
||||
def mkssml(
|
||||
text: Union[str, bytes], voice: str, rate: str, volume: str, pitch: str
|
||||
) -> str:
|
||||
"""
|
||||
Creates a SSML string from the given parameters.
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Main package.
|
||||
"""
|
||||
|
||||
|
||||
import argparse
|
||||
import asyncio
|
||||
import sys
|
||||
@@ -60,9 +59,9 @@ async def _run_tts(args: Any) -> None:
|
||||
pitch=args.pitch,
|
||||
)
|
||||
subs: SubMaker = SubMaker()
|
||||
with open(
|
||||
args.write_media, "wb"
|
||||
) if args.write_media else sys.stdout.buffer as audio_file:
|
||||
with (
|
||||
open(args.write_media, "wb") if args.write_media else sys.stdout.buffer
|
||||
) as audio_file:
|
||||
async for chunk in tts.stream():
|
||||
if chunk["type"] == "audio":
|
||||
audio_file.write(chunk["data"])
|
||||
|
||||
Reference in New Issue
Block a user