File tree Expand file tree Collapse file tree 3 files changed +63
-3
lines changed
Expand file tree Collapse file tree 3 files changed +63
-3
lines changed Original file line number Diff line number Diff line change @@ -129,4 +129,7 @@ dmypy.json
129129.pyre /
130130
131131voice.wav
132- audio.zip
132+ audio.zip
133+
134+ # vscode
135+ .vscode /*
Original file line number Diff line number Diff line change @@ -42,5 +42,8 @@ Example
4242 f.write(await audio_query.synthesis(speaker = 4 ))
4343
4444
45- if __name__ == " __main__" :
46- asyncio.run(main())
45+ if __name__ == " __main__" :
46+ # # already in asyncio (in a Jupyter notebook, for example)
47+ # await main()
48+ # # otherwise
49+ asyncio.run(main())
Original file line number Diff line number Diff line change 1+ {
2+ "cells" : [
3+ {
4+ "cell_type" : " code" ,
5+ "execution_count" : 1 ,
6+ "metadata" : {},
7+ "outputs" : [],
8+ "source" : [
9+ " from voicevox import Client\n " ,
10+ " import asyncio\n " ,
11+ " \n " ,
12+ " \n " ,
13+ " async def main():\n " ,
14+ " async with Client() as client:\n " ,
15+ " audio_query = await client.create_audio_query(\" こんにちは!\" , speaker=1)\n " ,
16+ " with open(\" voice.wav\" , \" wb\" ) as f:\n " ,
17+ " f.write(await audio_query.synthesis(speaker=1))\n " ,
18+ " \n " ,
19+ " \n " ,
20+ " if __name__ == \" __main__\" :\n " ,
21+ " await main()\n "
22+ ]
23+ },
24+ {
25+ "cell_type" : " code" ,
26+ "execution_count" : null ,
27+ "metadata" : {},
28+ "outputs" : [],
29+ "source" : []
30+ }
31+ ],
32+ "metadata" : {
33+ "kernelspec" : {
34+ "display_name" : " base" ,
35+ "language" : " python" ,
36+ "name" : " python3"
37+ },
38+ "language_info" : {
39+ "codemirror_mode" : {
40+ "name" : " ipython" ,
41+ "version" : 3
42+ },
43+ "file_extension" : " .py" ,
44+ "mimetype" : " text/x-python" ,
45+ "name" : " python" ,
46+ "nbconvert_exporter" : " python" ,
47+ "pygments_lexer" : " ipython3" ,
48+ "version" : " 3.9.13"
49+ },
50+ "orig_nbformat" : 4
51+ },
52+ "nbformat" : 4 ,
53+ "nbformat_minor" : 2
54+ }
You can’t perform that action at this time.
0 commit comments