Skip to content

Commit

Permalink
Merge pull request #871 from PrefectHQ/wheel-reqs
Browse files Browse the repository at this point in the history
Audio deps
  • Loading branch information
jlowin authored Mar 15, 2024
2 parents 97d9578 + a99412e commit 8227564
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 12 deletions.
72 changes: 64 additions & 8 deletions docs/welcome/installation.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,82 @@
# Installation
# Installing Marvin

Install Marvin with `pip`:

```shell
pip install marvin
```
```

To verify your installation, run `marvin version` in your terminal.
To verify your installation, run `marvin version` in your terminal.

Upgrade to the latest released version at any time:

```shell
pip install marvin -U
```

## Tutorial

Now that you've installed Marvin, check out the [tutorial](tutorial.md) to learn how to use it.
Next, check out the [tutorial](tutorial.md) to get started with Marvin.

## Requirements

Marvin requires Python 3.9 or greater, and is tested on all major Python versions and operating systems.

## Installing for Development
See the [contributing docs](../../community/development_guide) for instructions on installing Marvin for development.
## Optional dependencies

Marvin has a few features that have additional dependencies that are not installed by default. If you want to use these features, you can install the optional dependencies with the following commands:

### Audio features

Marvin can transcribe and generate speech out-of-the box by working with audio files, but in order to record and play sound, you'll need additional dependencies. See the [documentation](/docs/audio/recording) for more details.

Please follow the instructions to set up PyAudio and PyDub, then run:

```shell
pip install marvin[audio]
```

#### Set up PyAudio
Marvin's audio features depend on PyAudio, which may have additional platform-dependent instructions. Please review the PyAudio installation instructions [here](https://people.csail.mit.edu/hubert/pyaudio/) for the latest information.

On macOS, PyAudio depends on PortAudio, which can be installed with [Homebrew](https://brew.sh/):
```shell
brew install portaudio
```


#### Set up PyDub
Marvin's audio features also depend on PyDub, which may have additional platform-dependent instructions. Please review the PyDub installation instructions [here](https://github.com/jiaaro/pydub#dependencies).

Generally, you'll need to install ffmpeg.

On macOS, use [Homebrew](https://brew.sh/):
```shell
brew install ffmpeg
```

On Linux, use your package manager:
```shell
apt-get install ffmpeg libavcodec-extra
```

On Windows, see the PyDub instructions.

### Video features

Marvin has utilities for recording video that make it easy to apply vision AI models to video streams. See the [documentation](docs/video/recording) for more details.

```shell
pip install marvin[video]
```

### Development

Generally, to install Marvin for development, you'll need to use the `dev` extra. However, in practice you'll want to create an editable install from your local source code:

```shell
pip install -e "path/to/marvin[dev]"
```

To build the documentation, you may also have to install certain imaging dependencies of MkDocs Material, which you can learn more about [here](https://squidfunk.github.io/mkdocs-material/plugins/requirements/image-processing/#dependencies).


See the [contributing docs](../../community/development_guide) for further instructions.
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ nav:
- welcome/what_is_marvin.md

- Getting started:
- Installing: welcome/installation.md
- Installation: welcome/installation.md
- Tutorial: welcome/tutorial.md
# - help/legacy_docs.md

Expand Down
12 changes: 9 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ dependencies = [
"tiktoken>=0.4.0",
"typer>=0.9.0",
"typing_extensions>=4.0.0",
"tzdata>=2023.3", # need for windows
"uvicorn>=0.22.0"
# need for windows
"tzdata>=2023.3",
"uvicorn>=0.22.0",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -58,8 +59,13 @@ tests = [
audio = [
"SpeechRecognition>=3.10",
"PyAudio>=0.2.11",
# playsound reqs
"playsound >= 1.0",
"pydub >= 0.25",
"wheel>=0.43.0",
"PyObjC",
# pydub reqs
"pydub>=0.25",
"simpleaudio>=1.0",
]
video = [
"opencv-python >= 4.5",
Expand Down

0 comments on commit 8227564

Please sign in to comment.