Skip to content

Commit

Permalink
Added version 0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-rajak committed May 26, 2023
1 parent 1870291 commit 6028979
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 26 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@
- This command will install all the uninstalled required libraries used in script.
- Suggester.main()
- This will prompt user for input of audio file selection.
- Suggester.mp3towav()
- This will convert the selected .mp3 audio file to .wav file.
- Suggester.extract()
- This will extract the generic features of the selected audio file.
- Suggester.play_pause_stop()
Expand Down
Binary file added dist/pyvolsuggester-0.0.2-py3-none-any.whl
Binary file not shown.
Binary file added dist/pyvolsuggester-0.0.2.tar.gz
Binary file not shown.
35 changes: 18 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

[project]
[project] ## --------------------------------------------------------------------------------------------------------------------------------------
# This is the name of your project. The first time you publish this
# package, this name will be registered for you. It will determine how
# users can install this project, e.g.:
Expand All @@ -11,19 +11,19 @@
# There are some restrictions on what makes a valid project name
# specification here:
# https://packaging.python.org/specifications/core-metadata/#name
name = "PyVolSuggester" # Required
name = "PyVolSuggester" # Required ## --------------------------------------------------------------------------------------------------------------------------------------

# Versions should comply with PEP 440:
# https://www.python.org/dev/peps/pep-0440/
#
# For a discussion on single-sourcing the version, see
# https://packaging.python.org/guides/single-sourcing-package-version/
version = "0.0.1" # Required
version = "0.0.2" # Required ## --------------------------------------------------------------------------------------------------------------------------------------

# This is a one-line description or tagline of what your project does. This
# corresponds to the "Summary" metadata field:
# https://packaging.python.org/specifications/core-metadata/#summary
description = "Does audio feature extraction and suggest the feasible volumne for better feeling and experience." # Optional
description = "Does audio feature extraction and suggest the feasible volumne for better feeling and experience." # Optional ## --------------------------------------------------------------------------------------------------------------------------------------

# This is an optional longer description of your project that represents
# the body of text which users will see when they visit PyPI.
Expand All @@ -33,18 +33,18 @@ description = "Does audio feature extraction and suggest the feasible volumne fo
#
# This field corresponds to the "Description" metadata field:
# https://packaging.python.org/specifications/core-metadata/#description-optional
readme = "README.md" # Optional
readme = "README.md" # Optional ## --------------------------------------------------------------------------------------------------------------------------------------

# Specify which Python versions you support. In contrast to the
# 'Programming Language' classifiers above, 'pip install' will check this
# and refuse to install the project if the version does not match. See
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
requires-python = ">=3.7"
requires-python = ">=3.7" ## --------------------------------------------------------------------------------------------------------------------------------------

# This is either text indicating the license for the distribution, or a file
# that contains the license
# https://packaging.python.org/en/latest/specifications/core-metadata/#license
license = {file = "License.txt"}
license = {file = "License.txt"} ## --------------------------------------------------------------------------------------------------------------------------------------

# This field adds keywords for your project which will appear on the
# project page. What does your project relate to?
Expand All @@ -53,25 +53,26 @@ license = {file = "License.txt"}
# by commas, to be used to assist searching for the distribution in a
# larger catalog.
keywords = ["audio", "audio-feature-extraction", "volumne-suggester", "amplitude-wave", "spectogram", "RMS/Energy-spectogram", "zero-crossing-rate", "mel-frequency-cepstral-coefficients", "mel-frequency-spectogram", "chroma-feature", "tempogram"] # Optional
## --------------------------------------------------------------------------------------------------------------------------------------

# This should be your name or the name of the organization who originally
# authored the project, and a valid email address corresponding to the name
# listed.
authors = [
{name="Akash Rajak", email="[email protected]"}
]# Optional
]# Optional ## --------------------------------------------------------------------------------------------------------------------------------------

# This should be your name or the names of the organization who currently
# maintains the project, and a valid email address corresponding to the name
# listed.
maintainers = [
{name="Akash Rajak", email="[email protected]" }
] # Optional
] # Optional ## --------------------------------------------------------------------------------------------------------------------------------------

# Classifiers help users find your project by categorizing it.
#
# For a list of valid classifiers, see https://pypi.org/classifiers/
classifiers = [ # Optional
classifiers = [ # Optional ## --------------------------------------------------------------------------------------------------------------------------------------
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
Expand Down Expand Up @@ -115,7 +116,7 @@ classifiers = [ # Optional
#
# Similar to `dependencies` above, these must be valid existing
# projects.
[project.optional-dependencies] # Optional
[project.optional-dependencies] # Optional ## --------------------------------------------------------------------------------------------------------------------------------------
#dev = ["check-manifest"]
#test = ["coverage"]

Expand All @@ -129,12 +130,12 @@ classifiers = [ # Optional
# issues, where the source is hosted, where to say thanks to the package
# maintainers, and where to support the project financially. The key is
# what's used to render the link text on PyPI.
#[project.urls] # Optional
#"Homepage" = "https://github.com/pypa/sampleproject"
#"Bug Reports" = "https://github.com/pypa/sampleproject/issues"
#"Funding" = "https://donate.pypi.org"
[project.urls] # Optional ## --------------------------------------------------------------------------------------------------------------------------------------
"Homepage" = "https://github.com/akash-rajak/PyVolSuggester"
"Bug Reports" = "https://github.com/akash-rajak/PyVolSuggester/issues"
"Funding" = "https://donate.pypi.org"
#"Say Thanks!" = "http://saythanks.io/to/example"
#"Source" = "https://github.com/pypa/sampleproject/"
"Source" = "https://github.com/akash-rajak/PyVolSuggester"

# The following would provide a command line executable called `sample`
# which executes the function `main` from this package when invoked.
Expand All @@ -148,7 +149,7 @@ classifiers = [ # Optional
# installed, specify them here.
#package-data = {"sample" = ["*.dat"]}

[build-system]
[build-system] ## --------------------------------------------------------------------------------------------------------------------------------------
# These are the assumed default build requirements from pip:
# https://pip.pypa.io/en/stable/reference/pip/#pep-517-and-518-support
requires = ["hatchling"]
Expand Down
11 changes: 4 additions & 7 deletions src/PyVolSuggester/Suggester.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def zero_crossing_rate():

y, sr = librosa.load(wav_file)
zcrs = librosa.feature.zero_crossing_rate(y)
print(f"Zero crossing rate: {sum(librosa.zero_crossings(y))}")
# print(f"Zero crossing rate: {sum(librosa.zero_crossings(y))}")
plt.figure(figsize=(15, 3))
plt.plot(zcrs[0])
plt.title(file_name + ' - Zero Crossing Rate')
Expand Down Expand Up @@ -410,12 +410,12 @@ def tempogram():
## function defined to get suggestion on volume
def suggest_volume():
global avg_rms
print("\nSuggestion on volumne : ")
print("\nSuggestion on volumne : ", end = ' ')

if(avg_rms>0.00001):
print("High")
print("High Volume")
else:
print("Low")
print("Low Volume")


## defining main function
Expand All @@ -427,8 +427,5 @@ def main():
print(file)
mp3towav()
# playsound(file)

## calling play_pause_stop function
# play_pause_stop(file)
else:
print("No File Selected")

0 comments on commit 6028979

Please sign in to comment.