Skip to content
Merged
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: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ The easiest way to install this is using ``pip install SpeechRecognition``.

Otherwise, download the source distribution from `PyPI <https://pypi.python.org/pypi/SpeechRecognition/>`__, and extract the archive.

In the folder, run ``python setup.py install``.
In the folder, run ``python -m pip install .``.

Requirements
------------
Expand Down Expand Up @@ -325,7 +325,7 @@ To hack on this library, first make sure you have all the requirements listed in

To install/reinstall the library locally, run ``python -m pip install -e .[dev]`` in the project `root directory <https://github.com/Uberi/speech_recognition>`__.

Before a release, the version number is bumped in ``README.rst`` and ``speech_recognition/__init__.py``. Version tags are then created using ``git config gpg.program gpg2 && git config user.signingkey DB45F6C431DE7C2DCD99FF7904882258A4063489 && git tag -s VERSION_GOES_HERE -m "Version VERSION_GOES_HERE"``.
Before a release, the version number is bumped in ``README.rst`` and ``speech_recognition/version.txt``. Version tags are then created using ``git config gpg.program gpg2 && git config user.signingkey DB45F6C431DE7C2DCD99FF7904882258A4063489 && git tag -s VERSION_GOES_HERE -m "Version VERSION_GOES_HERE"``.

Releases are done by running ``make-release.sh VERSION_GOES_HERE`` to build the Python source packages, sign them, and upload them to PyPI.

Expand Down
89 changes: 89 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"

[project]
name = "SpeechRecognition"
dynamic = ["version"]
description = "Library for performing speech recognition, with support for several engines and APIs, online and offline."
readme = { file = "README.rst", content-type = "text/x-rst" }
Comment thread
ftnext marked this conversation as resolved.
requires-python = ">=3.9"
license = { file = "LICENSE.txt" }
authors = [
{ name = "Anthony Zhang (Uberi)", email = "azhang9@gmail.com" },
]
maintainers = [
{ name = "nikkie", email = "takuyafjp+develop@gmail.com" },
]
keywords = ["speech", "recognition", "voice", "sphinx", "google", "wit", "bing", "api", "houndify", "ibm", "snowboy"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Other OS",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Multimedia :: Sound/Audio :: Speech",
]
dependencies = [
"typing-extensions",
"standard-aifc; python_version >= '3.13'",
"audioop-lts; python_version >= '3.13'",
]

[project.urls]
Homepage = "https://github.com/Uberi/speech_recognition#readme"

[project.scripts]
sprc = "speech_recognition.cli:main"

[project.optional-dependencies]
dev = [
"pytest",
"pytest-randomly",
"respx",
"numpy",
"pytest-httpserver",
"mypy",
"types-requests",
]
audio = ["PyAudio >= 0.2.11"]
pocketsphinx = ["pocketsphinx"]
google-cloud = ["google-cloud-speech"]
whisper-local = [
"openai-whisper",
"soundfile",
]
faster-whisper = [
"faster-whisper",
"soundfile",
]
openai = [
"openai",
"httpx < 0.28",
]
groq = [
"groq",
"httpx < 0.28",
]
assemblyai = ["requests"]
vosk = ["vosk"]

[tool.setuptools.package-data]
speech_recognition = ["version.txt"]

[tool.setuptools.packages.find]
exclude = ["tests.*", "test", "speech_recognition.models"]
namespaces = false


[tool.setuptools.dynamic]
version = { file = "speech_recognition/version.txt" }
31 changes: 0 additions & 31 deletions setup.cfg

This file was deleted.

52 changes: 2 additions & 50 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,51 +1,3 @@
#!/usr/bin/env python3
from setuptools import setup

from setuptools import find_packages, setup

import speech_recognition

setup(
name="SpeechRecognition",
version=speech_recognition.__version__,
packages=find_packages(exclude=["tests.*", "test", "speech_recognition.models"]),
include_package_data=True,

# PyPI metadata
author=speech_recognition.__author__,
author_email="azhang9@gmail.com",
maintainer="nikkie",
maintainer_email="takuyafjp+develop@gmail.com",
description=speech_recognition.__doc__,
long_description=open("README.rst").read(),
long_description_content_type="text/x-rst",
license=speech_recognition.__license__,
keywords="speech recognition voice sphinx google wit bing api houndify ibm snowboy",
url="https://github.com/Uberi/speech_recognition#readme",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: BSD License",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Other OS",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Multimedia :: Sound/Audio :: Speech",
],
python_requires=">=3.9",
install_requires=[
"typing-extensions",
"standard-aifc; python_version>='3.13'",
"audioop-lts; python_version>='3.13'",
],
entry_points={
"console_scripts": ["sprc=speech_recognition.cli:main"],
},
)
setup()
3 changes: 2 additions & 1 deletion speech_recognition/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import json
import math
import os
from pathlib import Path
import subprocess
import sys
import tempfile
Expand All @@ -36,7 +37,7 @@
)

__author__ = "Anthony Zhang (Uberi)"
__version__ = "3.14.6"
__version__ = Path(__file__).with_name("version.txt").read_text(encoding="utf-8").strip()
__license__ = "BSD"


Expand Down
1 change: 1 addition & 0 deletions speech_recognition/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.14.6