rany2 / edge-srt-to-speech

Convert SubRip to speech using Microsoft Edge's TTS service
https://pypi.org/project/edge-srt-to-speech/
GNU General Public License v3.0
42 stars 10 forks source link

[Feature Request] GUI Interface #6

Open photkey opened 2 years ago

photkey commented 2 years ago

Functions similar to: https://azure.microsoft.com/en-us/services/cognitive-services/text-to-speech/#features I made a simple sketch with this page and included another paragraph of reference data 界面

roleList = ['Default', 'YoungAdultFemale', 'YoungAdultMale', 'OlderAdultFemale', 'OlderAdultMale', 'SeniorFemale', 'SeniorMale', 'Girl', 'Boy']
voices = {
    'zh-CN': {
        'zh-CN-YunyeNeural': {
            'name': 'Yunye',
            'style': ['General', 'angry', 'calm', 'cheerful', 'disgruntled', 'embarrassed', 'fearful', 'sad', 'serious'],
            'role': roleList,
            'style_support': 'Optimized for story narrating, multiple role-play and styles available using SSML'},
        'zh-CN-XiaoxiaoNeural': {
            'name': 'Xiaoxiao',
            'style': ['General', 'affectionate', 'angry', 'assistant', 'calm', 'chat', 'cheerful', 'customerservice', 'disgruntled', 'fearful', 'gentle', 'lyrical', 'newscast', 'sad', 'serious'],
            'role': None,
            'style_support': 'General, multiple voice styles available using SSML'},
        'zh-CN-XiaohanNeural': {
            'name': 'Xiaohan',
            'style': ['General', 'affectionate', 'angry', 'calm', 'cheerful', 'disgruntled', 'embarrassed', 'fearful', 'gentle', 'sad', 'serious'],
            'role': None,
            'style_support': 'General, multiple styles available using SSML'},
        'zh-CN-XiaoruiNeural': {
            'name': 'Xiaorui',
            'style': ['General', 'angry', 'calm', 'fearful', 'sad'],
            'role': None,
            'style_support': 'Senior voice, multiple styles available using SSML'},
        'zh-CN-XiaomoNeural': {
            'name': 'Xiaomo',
            'style': ['General', 'affectionate', 'angry', 'calm', 'cheerful', 'depressed', 'disgruntled', 'embarrassed', 'envious', 'fearful', 'gentle', 'sad', 'serious'],
            'role': roleList,
            'style_support': 'General, multiple role-play and styles available using SSML'},
        'zh-CN-XiaochenNeural': {
            'name': 'Xiaochen',
            'style': None,
            'role': None,
            'style_support': 'Optimized for spontaneous conversation'},
        'zh-CN-XiaoqiuNeural': {
            'name': 'Xiaoqiu',
            'style': None,
            'role': None,
            'style_support': 'Optimized for narrating'}
    },

    'en-US': {
        'en-US-GuyNeural': {
            'name': 'Guy',
            'style': ['General', 'newscast'],
            'role': None,
            'style_support': 'General, multiple voice styles available using SSML'},
        'en-US-AriaNeural': {
            'name': 'Aria',
            'style': ['General', 'chat', 'cheerful', 'customerservice', 'empathetic', 'narration-professional', 'newscast-casual', 'newscast-formal'],
            'role': None, 'style_support': 'General, multiple voice styles available using SSML'},
        'en-US-JennyNeural': {
            'name': 'Jenny',
            'style': ['General', 'assistant', 'chat', 'customerservice', 'newscast'],
            'role': None,
            'style_support': 'General, multiple voice styles available using SSML'},
        'en-US-SaraNeural': {
            'name': 'Sara',
            'style': ['General', 'angry', 'cheerful', 'sad'],
            'role': None,
            'style_support': 'General, multiple voice styles available using SSML'}
    }
}

# role、style Data from:https://azure.microsoft.com/en-us/services/cognitive-services/text-to-speech/#features
# Style_support Data from:https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support#text-to-speech

Supports accepting command line arguments to start: srt_file ,out_file, voice.

A SSML template needs to be built in, e.g.

<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis"
       xmlns:mstts="https://www.w3.org/2001/mstts" xml:lang="{lang}">
    <voice name="{voice}">
        <mstts:express-as role="{role}" style="{style}" styledegree="{styledegree}">
        <prosody pitch="{pitch}" rate="{rate}" volume="{volume}">
            {text}
        </prosody>
        </mstts:express-as>
    </voice>
</speak>
rany2 commented 2 years ago

Hello, no time frame for when I'll put something like this out but thanks a lot for the info with voice list, supported styles, etc. I think it might be a good idea to also attempt to add contour but that might be too complicated a feature and not suitable for the vast majority of users.On Mar 21, 2022 5:53 AM, photkey @.***> wrote:

Functions similar to: https://azure.microsoft.com/en-us/services/cognitive-services/text-to-speech/#features

I made a simple sketch with this page and included another paragraph of reference data

roleList = ['Default', 'YoungAdultFemale', 'YoungAdultMale', 'OlderAdultFemale', 'OlderAdultMale', 'SeniorFemale', 'SeniorMale', 'Girl', 'Boy']

voices = {

'zh-CN': {

    'zh-CN-YunyeNeural': {

        'name': 'Yunye',

        'style': ['General', 'angry', 'calm', 'cheerful', 'disgruntled', 'embarrassed', 'fearful', 'sad', 'serious'],

        'role': roleList,

        'style_support': 'Optimized for story narrating, multiple role-play and styles available using SSML'},

    'zh-CN-XiaoxiaoNeural': {

        'name': 'Xiaoxiao',

        'style': ['General', 'affectionate', 'angry', 'assistant', 'calm', 'chat', 'cheerful', 'customerservice', 'disgruntled', 'fearful', 'gentle', 'lyrical', 'newscast', 'sad', 'serious'],

        'role': None,

        'style_support': 'General, multiple voice styles available using SSML'},

    'zh-CN-XiaohanNeural': {

        'name': 'Xiaohan',

        'style': ['General', 'affectionate', 'angry', 'calm', 'cheerful', 'disgruntled', 'embarrassed', 'fearful', 'gentle', 'sad', 'serious'],

        'role': None,

        'style_support': 'General, multiple styles available using SSML'},

    'zh-CN-XiaoruiNeural': {

        'name': 'Xiaorui',

        'style': ['General', 'angry', 'calm', 'fearful', 'sad'],

        'role': None,

        'style_support': 'Senior voice, multiple styles available using SSML'},

    'zh-CN-XiaomoNeural': {

        'name': 'Xiaomo',

        'style': ['General', 'affectionate', 'angry', 'calm', 'cheerful', 'depressed', 'disgruntled', 'embarrassed', 'envious', 'fearful', 'gentle', 'sad', 'serious'],

        'role': roleList,

        'style_support': 'General, multiple role-play and styles available using SSML'},

    'zh-CN-XiaochenNeural': {

        'name': 'Xiaochen',

        'style': None,

        'role': None,

        'style_support': 'Optimized for spontaneous conversation'},

    'zh-CN-XiaoqiuNeural': {

        'name': 'Xiaoqiu',

        'style': None,

        'role': None,

        'style_support': 'Optimized for narrating'}

},

'en-US': {

    'en-US-GuyNeural': {

        'name': 'Guy',

        'style': ['General', 'newscast'],

        'role': None,

        'style_support': 'General, multiple voice styles available using SSML'},

    'en-US-AriaNeural': {

        'name': 'Aria',

        'style': ['General', 'chat', 'cheerful', 'customerservice', 'empathetic', 'narration-professional', 'newscast-casual', 'newscast-formal'],

        'role': None, 'style_support': 'General, multiple voice styles available using SSML'},

    'en-US-JennyNeural': {

        'name': 'Jenny',

        'style': ['General', 'assistant', 'chat', 'customerservice', 'newscast'],

        'role': None,

        'style_support': 'General, multiple voice styles available using SSML'},

    'en-US-SaraNeural': {

        'name': 'Sara',

        'style': ['General', 'angry', 'cheerful', 'sad'],

        'role': None,

        'style_support': 'General, multiple voice styles available using SSML'}

}

}

role、style Data from:https://azure.microsoft.com/en-us/services/cognitive-services/text-to-speech/#features

Style_support Data from:https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support#text-to-speech

Supports accepting command line arguments to start: srt_file ,out_file, voice.

—Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

photkey commented 2 years ago

Your development speed, every time, is amazingly fast, looking forward to your good news. Please let me know if you need me to do the tedious and unskilled work of organizing voice lists, supported styles, etc. I will be happy to do.

rany2 commented 2 years ago

I'm sorry but I've been really busy these few weeks. I'll try to do something about this soon but no ETA or promises :(

rany2 commented 1 year ago

Sadly a lot of the features which were previously available had to remove because of Microsoft increasing security of their API endpoint. For example, now custom SSML is no longer available; so for now we have to get rid of a lot of these features and simplify everything to only what Edge could offer (very sad..)

photkey commented 1 year ago

This is indeed a bit of a shame, and I noticed the change when edge-tts was updated. Hopefully the update to edge-srt-to-speech will now be synchronized to remove the parts that are no longer working (sadly, but no way). I've been looking forward to the gui, hopefully when you're not busy you can still implement it, thanks.

photkey commented 1 year ago

@rany2 If you have time to hopefully update this library, declare: absolutely this is absolutely not a rush, just afraid you will forget this library, remind it Oh. Thank you.

rany2 commented 1 year ago

I haven't forgotten about this, but I'm not able to work on this now.