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

setup.py for easy installation, and instructions on modifying hyperparameters #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

.ipynb_checkpoints
__pycache__
.env/*
.env/*

torchvggish.egg-info/
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ except: urllib.request.urlretrieve(url, filename)
model.forward(filename)
```

If you want to modify hyperparameters in `torchvggish.vggish_params`,
add the following `install_requires` to your `setup.py`:
```
"torchvggish @ git+https://github.com/neuralaudio/torchvggish.git@setup.py#egg=torchvggish",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you approve this PR and will merge it, I will change the URL to the main repo with branch master.

```
and then `import torchvggish.vggish_params` in your code.

<hr>
[1] S. Hershey et al., ‘CNN Architectures for Large-Scale Audio Classification’,\
in International Conference on Acoustics, Speech and Signal Processing (ICASSP),2017\
Expand Down
22 changes: 22 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env python3
from setuptools import find_packages, setup

long_description = open("README.md", "r", encoding="utf-8").read()

setup(
name="torchvggish",
version="v0.1.1",
description="Pytorch port of Google Research's VGGish model used for extracting audio features.",
author="Harri Taylor",
author_email="harritaylor@protonmail.com",
url="https://github.com/harritaylor/torchvggish",
license="Apache-2.0",
long_description=long_description,
long_description_content_type="text/markdown",
packages=find_packages(),
python_requires=">=3.6",
install_requires=['torch', 'numpy', 'resampy', 'soundfile'],
extras_require={
},
)

Empty file added torchvggish/__init__.py
Empty file.