【发布时间】:2020-09-25 03:13:15
【问题描述】:
我对“[mp3 @ 000001dc99bec540] 从比特率估计持续时间,这可能不准确”有疑问,使用 discord.py。一切正常(机器人正在说出我们告诉他的文本),但最后总是显示出来。我该如何解决?
if _command == "speak":
try:
await message.delete()
try:
error = _message[1]
except IndexError:
message = await _channel.send("Where is my text, which I have to speak?!")
await asyncio.sleep(3)
await message.delete()
return
channel = message.author.voice.channel
voice = discord.utils.get(client.voice_clients, guild=_guild)
if voice and voice.is_connected():
await voice.move_to(channel)
else:
voice = await channel.connect()
tts = gTTS(text=text, lang='en')
tts.save("pcvoice.mp3")
voice.play(discord.FFmpegPCMAudio(executable=r"C:\ffmpeg\bin\ffmpeg.exe", source="pcvoice.mp3"))
except discord.errors.ClientException:
await _channel.send("Come on! I am already playing something!")
【问题讨论】:
-
听起来像是开启了 ffmpeg 调试标志。
-
嗯,你知道如何禁用它吗?
标签: python ffmpeg mp3 discord.py ggts