https://github.com/ffont/freesound-remote-player
Server and simple cli tool to play Freesound sounds from your terminal
https://github.com/ffont/freesound-remote-player
Last synced: 11 months ago
JSON representation
Server and simple cli tool to play Freesound sounds from your terminal
- Host: GitHub
- URL: https://github.com/ffont/freesound-remote-player
- Owner: ffont
- Created: 2016-11-22T10:20:50.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-23T11:39:35.000Z (over 8 years ago)
- Last Synced: 2025-03-26T08:48:02.013Z (about 1 year ago)
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Freesound Remote Player
This repository contains a server and simple cli tool to play Freesound sounds from your terminal.
Both the server and the client are implemented in Python.
## Running the server (`server.py`)
The server is a [Flask](http://flask.pocoo.org) application and uses [pydub](https://github.com/jiaaro/pydub) for playing audio. You can install these requirements with:
```
pip install pydub Flask
```
In order to play audio, `pydub` depends on either ffmpeg or libav.
Please check the [instructions](https://github.com/jiaaro/pydub#getting-ffmpeg-set-up) on `pydub`repository for installing these dependencies. Should be as simple as `apt-get install libav-tools libavcodec-extra-53` or similar.
The server needs to be configured before running using environment variables:
* `FS_API_KEY`: Freesound api key (request one at https://freesound.org/apiv2/apply)
* `PORT` (optional): Port where the server will be listening
You can export variables and start the server in a single command:
```
export FS_API_KEY="YOUR_KEY"; python server.py
```
## Running the client (`freesound-cli-player.py`)
This script will accepts a number of arguments and makes a request to the remote player server.
`freesound-cli-player.py` can be distributed separately from the server and has no python requirements.
For the client to work `HOST` and `PORT` must be configured and point to a reachable Freesound Remote Player server.
Example usage:
```
python freesound-cli-player dogs barking
```