Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SFX/TTS] Adding SFX or playing tts fails #24

Open
DJTOMATO opened this issue May 18, 2022 · 0 comments
Open

[SFX/TTS] Adding SFX or playing tts fails #24

DJTOMATO opened this issue May 18, 2022 · 0 comments

Comments

@DJTOMATO
Copy link

DJTOMATO commented May 18, 2022

Adding sfx or playing sounds gives the same error:

!addsfx oof https://cdn.discordapp.com/attachments/861428239012069416/976344074414088212/uuhhh.mp3
!tts es test

Traceback (most recent call last):
  File "redenv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/cogs/CogManager/cogs/sfx/sfx.py", line 65, in tts
    audio_data = pydub.AudioSegment.from_mp3(audio_file)
  File "/cogs/Downloader/lib/pydub/audio_segment.py", line 796, in from_mp3
    return cls.from_file(file, 'mp3', parameters=parameters)
  File "/cogs/Downloader/lib/pydub/audio_segment.py", line 728, in from_file
    info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)
  File "/cogs/Downloader/lib/pydub/utils.py", line 279, in mediainfo_json
    info = json.loads(output)
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "redenv/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "redenv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "redenv/lib/python3.9/site-packages/discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: JSONDecodeError: Expecting value: line 1 column 1 (char 0)```` 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant