tetsuya-ki / discord-jtalkbot Goto Github PK
View Code? Open in Web Editor NEWDiscordのテキストチャンネルに投稿されたメッセージをボイスチャンネルで読み上げるBotです(jtalkbotを改造したもの)
License: MIT License
Discordのテキストチャンネルに投稿されたメッセージをボイスチャンネルで読み上げるBotです(jtalkbotを改造したもの)
License: MIT License
遅めのサーバーだと反応が返せなくてタイムアウトする。
そうなると、もう読み上げてくれない。。。
多分、下記Zennの記事をもとに修正したら対処できるとは思う
https://zenn.dev/tfandkusu/scraps/824214ceb45a3f
INFO:cogs.autoreadercog:talk(nitech_jp_atr503_m001.htsvoice):ボットさん、From: NHK NEWS WEB 社会
ERROR:discord.client:Attempting a reconnect in 1.64s
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 561, in connect
await self.ws.poll_event()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/gateway.py", line 587, in poll_event
raise ConnectionClosed(self.socket, shard_id=self.shard_id, code=code) from None
discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 1000
ERROR:discord.voice_client:Disconnected from voice... Reconnecting in 0.89s.
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/voice_client.py", line 414, in poll_voice_ws
await self.ws.poll_event()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/gateway.py", line 892, in poll_event
msg = await asyncio.wait_for(self.ws.receive(), timeout=30.0)
File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError
WARNING:discord.gateway:Shard ID None has stopped responding to the gateway. Closing and restarting.
WARNING:discord.voice_client:Could not connect to voice... Retrying...
WARNING:aiohttp.websocket:websocket connection is closing.
INFO:cogs.autoreadercog:discord-jtalkbot#5425 disconnected v:PrivateServer/General.
INFO:cogs.autoreadercog:1 人になりました
声色設定機能で使用する環境変数voices
の説明がない
Queueでやればなんとかなると思っている。
調べるのが億劫でできていないが。。。
open_jtalk
で読み上げさせる際、別のhtsvoice
を読み込ませればいいhtsvoice
が全部使われていたら、適当に振る)規則音声合成エンジン AquesTalkが使えるのは確認済。
(ただ、注意点が色々ありそうだから自分のローカルで試す程度にとどめてた)
Pythonから呼び出せるなら、他の音声合成エンジンもできる気がする。
そういうのが把握できたら、色々追記してもいいかもしれない。
voicesをpopしまくって、�0になったら以下のところで常にデフォルトのvoiceが使われてしまう。
if len(self.voices) == 0 or not self.member_name:
以下の部分が特に良くない
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.