21211112
This commit is contained in:
1 parent
5cfd8f1190
commit
cc5ad90fd1
3 files changed
+211
-69
No files matched your search
+26
-6
@@ -9,7 +9,7 @@
|
||||
"#gTTS语音\n",
|
||||
"from gtts import gTTS\n",
|
||||
"#engine = pyttsx3.init('espeak')\n",
|
||||
"tts = gTTS(text=\"军士上前,将英玉兰架起,两个抓着脚踝,两个托住肩头,一起用力,英玉兰无奈分开两条大浪腿,露出骚屄,被举下\",lang='zh-cn')\n",
|
||||
"tts = gTTS(text=\"军士上前,将英玉兰架起,英玉兰被举下\",lang='zh-cn')\n",
|
||||
"#engine.save_to_file(\"欢迎使用百度语音合成,本次测试为Python接口\",'./test')\n",
|
||||
"tts.save(\"./test.mp3\")\n",
|
||||
"print('ok')"
|
||||
@@ -17,9 +17,29 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"execution_count": 1,
|
||||
"metadata": {
|
||||
"execution": {
|
||||
"iopub.execute_input": "2021-11-09T07:21:49.711270Z",
|
||||
"iopub.status.busy": "2021-11-09T07:21:49.709862Z",
|
||||
"iopub.status.idle": "2021-11-09T07:21:50.010690Z",
|
||||
"shell.execute_reply": "2021-11-09T07:21:50.007394Z",
|
||||
"shell.execute_reply.started": "2021-11-09T07:21:49.711004Z"
|
||||
}
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"ename": "ModuleNotFoundError",
|
||||
"evalue": "No module named 'aip'",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
||||
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
|
||||
"\u001b[0;32m<ipython-input-1-3dd6f47059b1>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m#百度语音在线\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0maip\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mAipSpeech\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;34m\"\"\" 你的 APPID AK SK \"\"\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mAPP_ID\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m'17553946'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
||||
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'aip'"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"#百度语音在线\n",
|
||||
"from aip import AipSpeech\n",
|
||||
@@ -31,7 +51,7 @@
|
||||
"\n",
|
||||
"client = AipSpeech(APP_ID, API_KEY, SECRET_KEY)\n",
|
||||
"\n",
|
||||
"result = client.synthesis('军士上前,将英玉兰架起,两个抓着脚踝,两个托住肩头,一起用力,英玉兰无奈分开两条大浪腿,露出骚屄,被举下。', 'zh', 5, {\n",
|
||||
"result = client.synthesis('军士上前,将英玉兰架起,英玉兰被举下。', 'zh', 5, {\n",
|
||||
" 'vol': 5,'per': 4,\n",
|
||||
"})\n",
|
||||
"\n",
|
||||
@@ -66,7 +86,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.5"
|
||||
"version": "3.8.10"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
Reference in new issue
Block a user