Update edge-tts to version 4.0.11
* Add pylint check for lint.sh
* Change overlapping default from 5second to 1second for SubMaker and util.py
* Default to WordBoundary for edge-playback (from SentenceBoundary)
* Drop SentenceBoundary support (never works properly and too many hacks)
- No longer actually supported by Azure's official SDK for a few years
already
* Stop attempting to correct broken offsets sent back to us by Azure
- Fixes never work properly because AI voice sometimes takes odd pauses
at the start and sometimes doesn't do so. It's never predictable and
cannot be fixed on the library's end.
- Solution is for Microsoft to fix the integer overflow bug they are facing
in the {Word,Sentence}Boundary offsets. It doesn't affect us until we reach
30min long TTS anyway.
* Have edge-tts --list-voices use the configured HTTP proxy
* More misc changes and fixes
This commit is contained in:
@@ -10,11 +10,11 @@ import sys
|
||||
from edge_tts import Communicate, SubMaker, list_voices
|
||||
|
||||
|
||||
async def _list_voices():
|
||||
async def _list_voices(proxy):
|
||||
"""
|
||||
List available voices.
|
||||
"""
|
||||
for idx, voice in enumerate(await list_voices()):
|
||||
for idx, voice in enumerate(await list_voices(proxy=proxy)):
|
||||
if idx != 0:
|
||||
print()
|
||||
|
||||
@@ -112,13 +112,13 @@ async def _main():
|
||||
"-O",
|
||||
"--overlapping",
|
||||
help="overlapping subtitles in seconds",
|
||||
default=5,
|
||||
default=1,
|
||||
type=float,
|
||||
)
|
||||
parser.add_argument(
|
||||
"-b",
|
||||
"--boundary-type",
|
||||
help="set boundary type for subtitles. Default 0 for none. Set 1 for word_boundary, 2 for sentence_boundary",
|
||||
help="set boundary type for subtitles. Default 0 for none. Set 1 for word_boundary.",
|
||||
default=0,
|
||||
type=int,
|
||||
)
|
||||
@@ -136,7 +136,7 @@ async def _main():
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.list_voices:
|
||||
await _list_voices()
|
||||
await _list_voices(args.proxy)
|
||||
sys.exit(0)
|
||||
|
||||
if args.text is not None or args.file is not None:
|
||||
|
||||
Reference in New Issue
Block a user