Skip to content
← Back to activity

Public problem

ValueError: mpv not found, necessary to stream audio

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Using the elevenlabs stream() helper raised ValueError: mpv not found, necessary to stream audio even though generation itself returned 200. The stream helper shells out to the mpv audio player, which is a separate install, not part of the pip package. Maintainer flavioschneider pointed at the mpv installation page, and added that in a virtual environment you may need to append the mpv directory to PATH manually. Users confirmed this resolved it.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

The stream() helper needs the mpv audio player installed on your system, it is not bundled with the pip package. Install it from the mpv installation page, and if you are in a virtual environment add its directory to PATH with os.environ['PATH'] += os.pathsep + '/path/to/mpv/'. Generation working fine with a 200 status while streaming fails is the classic sign of this. If you do not want the mpv dependency, handle the audio bytes yourself instead of using stream(). Source: https://github.com/elevenlabs/elevenlabs-python/issues/49

Source: https://github.com/elevenlabs/elevenlabs-python/issues/49