-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
liugaowei
committed
Apr 18, 2023
1 parent
fde0d05
commit b803224
Showing
9 changed files
with
2,325 additions
and
2,514 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,4 @@ dist-ssr | |
|
||
release | ||
.vscode/.debug.env | ||
.vscode/settings.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"typescript.enablePromptUseWorkspaceTsdk": true, | ||
} | ||
"cSpell.words": [ | ||
"customvoiceconnectionid", | ||
"KHTML", | ||
"mstts", | ||
"southeastasia", | ||
"ssml" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
var axios = require("axios");const fs = require("fs"); | ||
|
||
const speechApi = (ssml: string) => { | ||
var data = JSON.stringify({ | ||
ssml, | ||
ttsAudioFormat: "audio-24khz-160kbitrate-mono-mp3", | ||
offsetInPlainText: 0, | ||
properties: { | ||
SpeakTriggerSource: "AccTuningPagePlayButton", | ||
}, | ||
}); | ||
|
||
var config = { | ||
method: "post", | ||
url: "https://southeastasia.api.speech.microsoft.com/accfreetrial/texttospeech/acc/v3.0-beta1/vcg/speak", | ||
responseType: "arraybuffer", | ||
headers: { | ||
authority: "southeastasia.api.speech.microsoft.com", | ||
accept: "*/*", | ||
"accept-language": "zh-CN,zh;q=0.9", | ||
customvoiceconnectionid: "d8a3a480-dd87-11ed-8758-97b5a7fbfaf6", | ||
origin: "https://speech.microsoft.com", | ||
"sec-ch-ua": | ||
'"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"', | ||
"sec-ch-ua-mobile": "?0", | ||
"sec-ch-ua-platform": '"Windows"', | ||
"sec-fetch-dest": "empty", | ||
"sec-fetch-mode": "cors", | ||
"sec-fetch-site": "same-site", | ||
"user-agent": | ||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36", | ||
"content-type": "application/json", | ||
}, | ||
|
||
data: data, | ||
}; | ||
|
||
return new Promise((resolve, reject) => { | ||
axios(config) | ||
.then(function (response) { | ||
resolve(response.data); | ||
}) | ||
.catch(function (error) { | ||
reject(error); | ||
}); | ||
}); | ||
}; | ||
export default { | ||
speechApi, | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "tts-vue", | ||
"version": "1.8.8", | ||
"version": "1.9.0", | ||
"main": "dist/electron/main/index.js", | ||
"description": "🎤 微软语音合成工具,使用 Electron + Vue + ElementPlus + Vite 构建。", | ||
"author": "沫離Loker <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.