Skip to content

Commit

Permalink
Merge pull request #9 from nschloe/rename
Browse files Browse the repository at this point in the history
rename to spectro
  • Loading branch information
nschloe authored Jul 28, 2021
2 parents bad2a12 + 83b50fc commit fc908ac
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ jobs:
- name: Test with tox
run: |
pip install tox
tox -- --cov specky --cov-report xml --cov-report term
tox -- --cov spectro --cov-report xml --cov-report term
- uses: codecov/codecov-action@v1
if: ${{ matrix.python-version == '3.9' }}
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# specky Code of Conduct
# spectro Code of Conduct

## Our Pledge

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# specky contributing guidelines
# spectro contributing guidelines

The specky community appreciates your contributions via issues and
The spectro community appreciates your contributions via issues and
pull requests. Note that the [code of conduct](CODE_OF_CONDUCT.md)
applies to all interactions with the specky project, including
applies to all interactions with the spectro project, including
issues and pull requests.

When submitting pull requests, please follow the style guidelines of
Expand Down
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
<p align="center">
<a href="https://github.com/nschloe/specky"><img alt="specky" src="https://nschloe.github.io/specky/specky-logo.svg" width="50%"></a>
<a href="https://github.com/nschloe/spectro"><img alt="spectro" src="https://nschloe.github.io/spectro/spectro-logo.svg" width="50%"></a>
<p align="center">Delicious audio file spectrograms.</p>
</p>

[![PyPi Version](https://img.shields.io/pypi/v/specky.svg?style=flat-square)](https://pypi.org/project/specky)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/specky.svg?style=flat-square)](https://pypi.org/pypi/specky/)
[![GitHub stars](https://img.shields.io/github/stars/nschloe/specky.svg?style=flat-square&logo=github&label=Stars&logoColor=white)](https://github.com/nschloe/specky)
[![PyPi downloads](https://img.shields.io/pypi/dm/specky.svg?style=flat-square)](https://pypistats.org/packages/specky)
[![PyPi Version](https://img.shields.io/pypi/v/spectro.svg?style=flat-square)](https://pypi.org/project/spectro)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/spectro.svg?style=flat-square)](https://pypi.org/pypi/spectro/)
[![GitHub stars](https://img.shields.io/github/stars/nschloe/spectro.svg?style=flat-square&logo=github&label=Stars&logoColor=white)](https://github.com/nschloe/spectro)
[![PyPi downloads](https://img.shields.io/pypi/dm/spectro.svg?style=flat-square)](https://pypistats.org/packages/spectro)

[![gh-actions](https://img.shields.io/github/workflow/status/nschloe/specky/ci?style=flat-square)](https://github.com/nschloe/specky/actions?query=workflow%3Aci)
[![codecov](https://img.shields.io/codecov/c/github/nschloe/specky.svg?style=flat-square)](https://codecov.io/gh/nschloe/specky)
[![gh-actions](https://img.shields.io/github/workflow/status/nschloe/spectro/ci?style=flat-square)](https://github.com/nschloe/spectro/actions?query=workflow%3Aci)
[![codecov](https://img.shields.io/codecov/c/github/nschloe/spectro.svg?style=flat-square)](https://codecov.io/gh/nschloe/spectro)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)

specky is a collection of easy-to-use Python and command-line tools for analyzing audio
files. Install from [PyPi](https://pypi.org/project/specky/) with
spectro is a collection of easy-to-use Python and command-line tools for analyzing audio
files. Install from [PyPi](https://pypi.org/project/spectro/) with
```
pip install specky
pip install spectro
```
and use with
```bash
specky-show filename.mp3 # shows the wave spectrum of the audio file
specky-check {dirname or filename.mp3} # checks if the audio file is worse than it pretends to be
spectro-show filename.mp3 # shows the wave spectrum of the audio file
spectro-check {dirname or filename.mp3} # checks if the audio file is worse than it pretends to be
```
See `-h` for their respective command-line arguments.

The quality of MP3 files is typically determined by their bitrate. For audio files, *128
kbps* (kilobit per second) is considered low quality, *320 kbps* is considered high
quality. It is of course possible to re-encode a low-quality MP3 with a higher bitrate
or even a WAV file. specky can help singling out those foul eggs.
or even a WAV file. spectro can help singling out those foul eggs.

Here is the `specky-show` output of a [sample
file](https://nschloe.github.io/specky/Yamaha-V50-Ride-Pattern-120bpm.wav) (only first
Here is the `spectro-show` output of a [sample
file](https://nschloe.github.io/spectro/Yamaha-V50-Ride-Pattern-120bpm.wav) (only first
channel shown):

<img src="https://nschloe.github.io/specky/wav.png" width="100%"> | <img src="https://nschloe.github.io/specky/320.png" width="100%"> | <img src="https://nschloe.github.io/specky/256.png" width="100%">
<img src="https://nschloe.github.io/spectro/wav.png" width="100%"> | <img src="https://nschloe.github.io/spectro/320.png" width="100%"> | <img src="https://nschloe.github.io/spectro/256.png" width="100%">
:-------------------:|:------------------:|:--------------:|
Full-quality WAV | 320 kbps MP3 | 256 kbps MP3 |
<img src="https://nschloe.github.io/specky/192.png" width="100%"> | <img src="https://nschloe.github.io/specky/128.png" width="100%"> | <img src="https://nschloe.github.io/specky/96.png" width="100%">
<img src="https://nschloe.github.io/spectro/192.png" width="100%"> | <img src="https://nschloe.github.io/spectro/128.png" width="100%"> | <img src="https://nschloe.github.io/spectro/96.png" width="100%">
| 192 kbps MP3 | 128 kbps MP3 | 96 kbps MP3 |
<img src="https://nschloe.github.io/specky/64.png" width="100%"> | <img src="https://nschloe.github.io/specky/32.png" width="100%"> | <img src="https://nschloe.github.io/specky/16.png" width="100%">
<img src="https://nschloe.github.io/spectro/64.png" width="100%"> | <img src="https://nschloe.github.io/spectro/32.png" width="100%"> | <img src="https://nschloe.github.io/spectro/16.png" width="100%">
| 64 kbps MP3 | 32 kbps MP3 | 16 kbps MP3 |
16 changes: 6 additions & 10 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[metadata]
name = specky
version = 0.1.5
name = spectro
version = 0.2.0
author = Nico Schlömer
author_email = nico.schloemer@gmail.com
description = Audio file spectral analysis
url = https://github.com/nschloe/specky
url = https://github.com/nschloe/spectro
project_urls =
Code=https://github.com/nschloe/specky
Issues=https://github.com/nschloe/specky/issues
Code=https://github.com/nschloe/spectro
Issues=https://github.com/nschloe/spectro/issues
Funding=https://github.com/sponsors/nschloe
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down Expand Up @@ -39,10 +39,6 @@ python_requires = >=3.8
[options.packages.find]
where=src

[options.extras_require]
all = matplotlib
png = matplotlib

[options.entry_points]
console_scripts =
specky = specky.cli:main
spectro = spectro.cli:main
File renamed without changes.
2 changes: 1 addition & 1 deletion src/specky/_main.py → src/spectro/_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def _check_file(filename, window_length_s=0.05, channel=0):
else:
console.print(
f"[red]{filename} is WAV, but has max frequency "
f"about {f[k]:.0f} Hz. Check with specky show."
f"about {f[k]:.0f} Hz. Check with spectro show."
)
elif filename.suffix == ".mp3":
mp3_file = MP3(filename)
Expand Down
4 changes: 2 additions & 2 deletions src/specky/cli.py → src/spectro/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ def main(argv=None):


def _get_version_text():
__version__ = metadata.version("specky")
__version__ = metadata.version("spectro")
python_version = f"{version_info.major}.{version_info.minor}.{version_info.micro}"
return "\n".join(
[
f"specky {__version__} [Python {python_version}]",
f"spectro {__version__} [Python {python_version}]",
"Copyright (c) 2020-2021 Nico Schlömer",
]
)
6 changes: 3 additions & 3 deletions tests/test_all.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import pathlib

import specky
import spectro

this_dir = pathlib.Path(__file__).resolve().parent


def test_cli_show():
input_file = this_dir / "samples" / "16.mp3"
specky.cli.main(["show", str(input_file)])
spectro.cli.main(["show", str(input_file)])


def test_cli_check():
input_file = this_dir / "samples" / "16.mp3"
specky.cli.main(["check", str(input_file)])
spectro.cli.main(["check", str(input_file)])

0 comments on commit fc908ac

Please # to comment.