8000 ffmpeg needs to be installed · Issue #3 · simonw/ospeak · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
ffmpeg needs to be installed #3
Closed
@stuartmaxwell

Description

@stuartmaxwell

Hi Simon - I believe this needs to have ffmpeg installed before this will work.

Before installing ffmpeg:

$ ospeak "Hello there"
/Users/stuart/.local/pipx/venvs/ospeak/lib/python3.11/site-packages/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
  warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
/Users/stuart/.local/pipx/venvs/ospeak/lib/python3.11/site-packages/pydub/utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work
  warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning)
Traceback (most recent call last):
  File "/Users/stuart/.local/bin/ospeak", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Users/stuart/.local/pipx/venvs/ospeak/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/stuart/.local/pipx/venvs/ospeak/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/stuart/.local/pipx/venvs/ospeak/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/stuart/.local/pipx/venvs/ospeak/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/stuart/.local/pipx/venvs/ospeak/lib/python3.11/site-packages/ospeak/cli.py", line 84, in cli
    stream_and_play(text, voice, speed, speak or not output, token, output)
  File "/Users/stuart/.local/pipx/venvs/ospeak/lib/python3.11/site-packages/ospeak/cli.py", line 23, in stream_and_play
    audio = AudioSegment.from_file(byte_stream, format="mp3")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/stuart/.local/pipx/venvs/ospeak/lib/python3.11/site-packages/pydub/audio_segment.py", line 728, in from_file
    info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/stuart/.local/pipx/venvs/ospeak/lib/python3.11/site-packages/pydub/utils.py", line 274, in mediainfo_json
    res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/stuart/.pyenv/versions/3.11.6/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Users/stuart/.pyenv/versions/3.11.6/lib/python3.11/subprocess.py", line 1950, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe'

Then I installed ffmpeg: brew install ffmpeg

And the command worked perfectly. Probably just needs a note in the README file.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0