Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎样添加自己的Azure API?/ Add custom API function #43

Closed
anh3lang opened this issue Jan 26, 2023 · 9 comments
Closed

怎样添加自己的Azure API?/ Add custom API function #43

anh3lang opened this issue Jan 26, 2023 · 9 comments

Comments

@anh3lang
Copy link

Firstly, i would like to say that you have made a great app, at least for me!
Your app have worked very well, but sometimes I run into the situation that said "bad handshake" error. We know that the reasons behind the limit of Azure Demo API, and it take time for the app to work normal again. And you have to updated new API in the meantime, right? So, the main point of this post is it is better to have the function in which the end user can use their own API. Thanks for your great app!

@jing332
Copy link
Owner

jing332 commented Jan 26, 2023

Since I can't meet the conditions for creating an Azure account, I can't support the official Azure API.

@jing332
Copy link
Owner

jing332 commented Jan 26, 2023

However, you can use custom TTS, copy to clipboard, and then import the sample (not guaranteed to be available)
复制到剪贴板并导入配置:

URL: https://pastebin.com/raw/f935zwtQ

{
    "group": {
        "id": 1674742541938,
        "name": "Custom",
        "order": 12
    },
    "list": [
        {
            "id": 1111111,
            "groupId": 1674742541938,
            "displayName": "Azure eastasia",
            "tts": {
                "#type": "http",
                "url": "https://eastasia.tts.speech.microsoft.com/cognitiveservices/v1,{\n    \"method\": \"POST\",\n    \"body\": \"<speak version=\\\"1.0\\\" xml:lang=\\\"zh-CN\\\"><voice name=\\\"zh-CN-XiaoxiaoNeural\\\"><prosody rate=\\\"{{speakSpeed}}%\\\" pitch=\\\"0%\\\">{{speakText}}</prosody></voice></speak>\"\n}",
                "header": "{\n  \"Ocp-Apim-Subscription-Key\": \"API-KEY\",\n  \"Content-Type\": \"application/ssml+xml\",\n  \"X-Microsoft-OutputFormat\": \"audio-16khz-128kbitrate-mono-mp3\",\n  \"User-Agent\": \"TTS Server\"\n}",
                "rate": 20,
                "audioFormat": {
                }
            }
        }
    ]
}

Then replace API-KEY with your key
然后替换 API-KEY 为你的Azure密钥

@anh3lang
Copy link
Author

It is very helpful! Thanks!

@jing332 jing332 changed the title Add custom API function 怎样添加自己的Azure API?/ Add custom API function Jan 27, 2023
@dullwolfs
Copy link

可以添加我自己封装的API吗?我接口返回是base64的音频字符串

@jing332
Copy link
Owner

jing332 commented Mar 30, 2023

插件TTS可以做到

@jing332
Copy link
Owner

jing332 commented Mar 30, 2023

有示例请求和响应嘛?

@dullwolfs
Copy link

有示例请求和响应嘛?

没事了,我打算弄新API,响应给你音频流,你做的APP插件就可以识别到了,我弄了一个网址,服务器存上百上千个模型,有原神、碧蓝档案、柚子社、赛马娘、还有一些虚拟主播等。http://soundai.natapp1.cc/

@jing332
Copy link
Owner

jing332 commented Mar 31, 2023 via email

@jing332 jing332 closed this as completed Apr 23, 2023
@jing332
Copy link
Owner

jing332 commented May 3, 2023

有示例请求和响应嘛?

没事了,我打算弄新API,响应给你音频流,你做的APP插件就可以识别到了,我弄了一个网址,服务器存上百上千个模型,有原神、碧蓝档案、柚子社、赛马娘、还有一些虚拟主播等。http://soundai.natapp1.cc/

https://jt12.de/SYV2_4/2023/05/03/8/37/01/16830742216451acad9dd2f.json
我抽空写了个VITS插件,确保为最新开发板, 通过网络链接导入。
就是这延迟实在太高,基本都要等个5s以上,没法听

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants