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

Add speech2text model for offline #614

Open
wants to merge 596 commits into
base: offline-recognition
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
596 commits
Select commit Hold shift + click to select a range
54bb083
[test] recognize_legacy
ftnext Dec 5, 2023
e70d466
[test] Add parameter specified case
ftnext Dec 6, 2023
e72ae1f
[refactor] Not return empty list; raise error
ftnext Dec 6, 2023
e4e3caa
[refactor] Raise error in find_best_hypothesis
ftnext Dec 6, 2023
368a7ef
[bugfix] Missing ValueError
ftnext Dec 6, 2023
fa8e166
[refactor] convert_to_result raises error when result is invalid
ftnext Dec 6, 2023
140b469
[chore] Run doctest too
ftnext Dec 6, 2023
f69243f
[refactor] Remove first large test
ftnext Dec 6, 2023
594d7cd
Merge pull request #721 from ftnext/i719-refactor-google
ftnext Dec 6, 2023
1b737c5
[chore] Bump up 3.10.1; Support Python 3.11
ftnext Dec 6, 2023
50e006b
Updated to the latest OpenAI API changes, and fixed #720
yackermann Jan 14, 2024
c845904
Adds Parameter use_enhanced and model to GoogleCloudSpeech
HideyoshiNakazone Feb 15, 2024
42668ba
style: name based OpenAI document (minimum diff)
ftnext Mar 28, 2024
9a694d7
test: Tweak expected for latest Whisper
ftnext Mar 28, 2024
4a5b375
Merge pull request #729 from herrjemand/herrjemand-oai-whisper-api-fix
ftnext Mar 28, 2024
c028409
[chore] Bump up 3.10.2; Support openai-python 1.x
ftnext Mar 28, 2024
dd97ae8
[test] Add Whisper API normal case
ftnext Mar 29, 2024
105daa1
[test] Add Whisper API another normal case
ftnext Mar 29, 2024
3258e25
[chore] Install for added tests
ftnext Mar 29, 2024
4924857
Merge pull request #738 from ftnext/test-whisper-api
ftnext Mar 29, 2024
43ee24b
[chore] Install whisper package from PyPI
ftnext Mar 30, 2024
a742862
[test] Add openai-whisper test case with mock
ftnext Mar 30, 2024
a869cc3
[test] recognize_whisper(show_dict=True)
ftnext Mar 30, 2024
4afaa52
[test] Specify paramters of recognize_whisper
ftnext Mar 30, 2024
4c48ed6
[test] Remove cases with actual models
ftnext Mar 30, 2024
8da6e42
[docs] Install openai-whisper from PyPI
ftnext Mar 30, 2024
9194a47
Merge pull request #739 from ftnext/test-whisper
ftnext Mar 30, 2024
5e7432c
[chore] Add extra for openai-whisper
ftnext Mar 30, 2024
f294669
[chore] Refactor using extras
ftnext Mar 30, 2024
863b10a
[docs] Install whisper dependencies by specifying extra
ftnext Mar 30, 2024
0799b16
Merge pull request #740 from ftnext/tweak-whisper-extra
ftnext Mar 30, 2024
297b939
[chore] Bump up 3.10.3
ftnext Mar 30, 2024
ff73d86
[chore] Migrate rstcheck from TravisCI
ftnext Mar 31, 2024
c81cf8e
[bugfix] Fix indent
ftnext Mar 31, 2024
8bc8e2c
Merge pull request #741 from ftnext/action-rstcheck
ftnext Mar 31, 2024
3084166
[style] Remove unused import (F401)
ftnext Mar 31, 2024
cefc8a5
[style] Fix unused variable style
ftnext Mar 31, 2024
1768998
[style] Remove whitespace before ':' (E203)
ftnext Mar 31, 2024
b5de44b
[feat] Print error (Fix flake8 F841)
ftnext Mar 31, 2024
8ca8607
[bugfix] Fix redundant test case name
ftnext Mar 31, 2024
9852fa4
[style] Fix line break and operator; follow W504, ignore W503
ftnext Mar 31, 2024
b196ea1
[style] Remove whitespaces (W291, W293)
ftnext Apr 2, 2024
e5cb915
[style] Add spaces (E226)
ftnext Apr 2, 2024
283e7ec
[style] Add space before comment (E261)
ftnext Apr 2, 2024
8eb5a62
[style] Remove semicolon (E703)
ftnext Apr 2, 2024
e73968e
[style] Remove comment out code (E117)
ftnext Apr 2, 2024
a0457e6
[style] Same indent (E128)
ftnext Apr 2, 2024
c9f13ff
[style] Remove indent (E121)
ftnext Apr 2, 2024
d2ff8ba
[style] Remove whitespace (E211)
ftnext Apr 2, 2024
112c0c4
[refactor] Remove never used variable (F841)
ftnext Apr 2, 2024
c3b3315
[chore] Run flake8 for each pull request
ftnext Apr 2, 2024
67e6e7a
[chore] Thank you TravisCI
ftnext Apr 2, 2024
249d01a
[chore] Developers can Install dev dependencies
ftnext Apr 2, 2024
e1c457a
[docs] Show commands for development
ftnext Apr 2, 2024
53c994f
Merge pull request #742 from ftnext/action-flake8
ftnext Apr 2, 2024
41dc618
[bugfix] Support M1 Mac
ftnext Apr 14, 2024
eb3cf1e
Merge pull request #745 from ftnext/i655-support-m1-mac
ftnext Apr 14, 2024
5b3a8a0
[refactor] Install ffmpeg by GitHub Action
ftnext Apr 15, 2024
4f1dbc5
[test] Skip pocketsphinx on Windows (future drop)
ftnext Apr 15, 2024
4619ec5
[chore] Run unittests on Windows too
ftnext Apr 15, 2024
64c7e56
[bugfix] Omit brackets
ftnext Apr 16, 2024
f1e6a84
[bugfix] Confuse with skipIf
ftnext Apr 16, 2024
654c471
[test] Assert recognize_google attribute existance
ftnext Apr 16, 2024
765e2cf
Merge pull request #746 from ftnext/test-on-windows
ftnext Apr 16, 2024
8e0fa40
Adds Parameters use_enhanced and model to GoogleSpeechAPI docstring
HideyoshiNakazone Apr 26, 2024
daca000
Adds Missing Models to Docstring and Adds Missing Parameters to Libra…
HideyoshiNakazone Apr 26, 2024
abb35fe
Fixes Broken Formatting
HideyoshiNakazone Apr 26, 2024
c09f15f
[feat] Users can pass Google endpoint (ref #751)
ftnext May 5, 2024
ab8f5f5
Merge pull request #754 from ftnext/i743-pass-ssl-endpoint
ftnext May 5, 2024
75a7f6b
[chore] Bump up 3.10.4
ftnext May 5, 2024
9ce6510
Add `stream=` kwarg to `Recognizer.listen`
clusterfudge Jun 1, 2024
d3d145a
Merge pull request #757 from clusterfudge/master
Uberi Aug 13, 2024
4a8f9e1
maint: Remove distutils.log
ftnext Oct 17, 2024
d188527
Merge pull request #768 from ftnext/feature/remove-distutils-setup
ftnext Oct 17, 2024
eded4a6
maint: Remove deprecated disutils
ftnext Oct 17, 2024
a4d74d2
chore] Add extra 'audio' to install PyAudio >= 0.2.11
ftnext Oct 17, 2024
43129c0
bugfix: Revert installation of [audio] extra
ftnext Oct 18, 2024
0d5f7da
docs: Instructions to specify [audio] extra
ftnext Oct 18, 2024
b9ba641
Merge pull request #769 from ftnext/feature/remove-distutils-init
ftnext Oct 19, 2024
199272e
chore: Run tests with Python 3.12
ftnext Oct 19, 2024
484c2a9
docs: Show 3.12 support
ftnext Oct 19, 2024
d309620
maint: Drop Python 3.8
ftnext Oct 19, 2024
4ad8bb0
chore: Bump up Github Actions (fix warning)
ftnext Oct 19, 2024
09bb5de
Merge pull request #770 from ftnext/support-python3.12
ftnext Oct 19, 2024
d447aef
🎉 Bump up 3.11.0
ftnext Oct 20, 2024
b0c91ae
chore: Fix speech_recognition.recognizers would be ignored
ftnext Oct 20, 2024
8b31c7b
maint: Remove deprecated bdist_wheel.universal
ftnext Oct 20, 2024
e8991f3
chore: Install PyAudio in unittest Action
ftnext Oct 21, 2024
35cf8ac
Merge pull request #774 from ftnext/install-pyaudio-github-actions
ftnext Oct 21, 2024
0cc79b1
chore: Adopt pytest
ftnext Nov 2, 2024
fc2cfc3
Merge pull request #779 from ftnext/feature/pytest
ftnext Nov 2, 2024
ba6a2c6
refactor: Only assemblyai needs requests
ftnext Nov 3, 2024
a2ed0c2
Merge pull request #780 from ftnext/feature/tidy-deps-requests
ftnext Nov 3, 2024
c63b2e8
chore: Install aifc and audioop (removed by PEP 594) in Python 3.13
ftnext Nov 3, 2024
46bb470
Merge pull request #781 from ftnext/maint/py313-removal-modules
ftnext Nov 3, 2024
60a454b
chore: Run tests on Python 3.13 (excluding whisper-local)
ftnext Nov 3, 2024
f696476
bugfix: Action stntax error
ftnext Nov 3, 2024
4ce2121
bugfix: Install deadlib's aifc in advance. Needed on editable install
ftnext Nov 3, 2024
72e7290
bugfix: Pip install in aifc installed environment
ftnext Nov 3, 2024
2428c80
bugfix: setuptools is needed at no build isolation install
ftnext Nov 3, 2024
a24dd0d
bugfix: Fix typo
ftnext Nov 3, 2024
aadaec7
bugfix: import in test case
ftnext Nov 3, 2024
7614f10
Merge pull request #785 from ftnext/maint/run-tests-py313
ftnext Nov 3, 2024
dc0516a
refactor: Extract pocketsphinx extra
ftnext Nov 4, 2024
ad51005
docs: Show installation with pocketsphinx extra
ftnext Nov 4, 2024
c7b4cba
Merge pull request #787 from ftnext/refactor/pocketsphinx-extra
ftnext Nov 4, 2024
73c8cdf
Merge pull request #773 from ftnext/i772-remove-bdist_wheel.universal
ftnext Nov 9, 2024
201934d
Lint faster
cclauss Nov 11, 2024
4be8026
Better Implementation of API Params Configuration
HideyoshiNakazone Nov 28, 2024
2366761
Merge remote-tracking branch 'origin/master' into add-parameters-goog…
HideyoshiNakazone Nov 28, 2024
a099938
[feat] Draft Groq recognizer
ftnext Dec 3, 2024
4ed4268
[feat] Add Groq to Recognizer
ftnext Dec 3, 2024
0e697c3
[chore] Install with groq extra
ftnext Dec 3, 2024
4df5584
[bugfix] Correct environment variable name
ftnext Dec 3, 2024
7ad32b3
[refactor] Distinguish client creation from client use
ftnext Dec 3, 2024
7157b39
[test] Groq transcription
ftnext Dec 4, 2024
33a78b7
[test] Developers can unset environment variable for groq test
ftnext Dec 4, 2024
5f0437a
[feat] Support Groq's optional parameters
ftnext Dec 4, 2024
53a8611
[docs] Users can see recognize_groq's help
ftnext Dec 4, 2024
41c64a6
[docs] Users can read Groq instructions
ftnext Dec 4, 2024
7611aa5
[style] Black format
ftnext Dec 4, 2024
b2b9afe
[bugfix] Install groq library in CI
ftnext Dec 4, 2024
ce1962a
[bugfix] Install Groq on all runners
ftnext Dec 4, 2024
698cd76
[bugfix] RESPX is compatible with HTTPX<0.28
ftnext Dec 4, 2024
c4cb90f
Merge pull request #797 from ftnext/feature/groq-support
ftnext Dec 5, 2024
8bad51d
[refactor] Distinguish Whisper between OpenAI and Groq
ftnext Dec 5, 2024
21acf32
[test] Implementation with RESPX
ftnext Dec 5, 2024
ee7234d
[refactor] Use OpenAICompatibleRecognizer
ftnext Dec 5, 2024
26e5165
[test] Refine RESPX mock
ftnext Dec 7, 2024
ee84956
[test] OpenAI provides whisper-1 only
ftnext Dec 7, 2024
bbf6753
[feat] Partially support OpenAI's optional parameters
ftnext Dec 7, 2024
822a7c6
[chore] Ignore .python-version
ftnext Dec 7, 2024
26f58d1
[refactor] Rename OpenAI Whisper module
ftnext Dec 7, 2024
8ba44ef
[refactor] Clear name
ftnext Dec 7, 2024
81f48a2
[feat] Rename to recognize_openai (deprecate recognize_whisper_api)
ftnext Dec 7, 2024
b417fc9
Merge pull request #801 from ftnext/refactor/openai-whisper-api
ftnext Dec 7, 2024
bab6e06
[test] **kwargs fixed #681
ftnext Dec 7, 2024
161385b
[refactor] Extract setenv
ftnext Dec 7, 2024
cc00004
[test] **kwargs supports #676
ftnext Dec 7, 2024
d42245b
Merge pull request #802 from ftnext/feature/openai-optional-parameters
ftnext Dec 7, 2024
94ff4c4
[bugfix] Pass optional parameters
ftnext Dec 7, 2024
da40c32
[test] Fine-grained RESPX mock
ftnext Dec 7, 2024
5d37a83
[refactor] groq.recognize() is clear enough
ftnext Dec 8, 2024
f984c59
[refactor] Only groq is responsible for GROQ_API_KEY
ftnext Dec 8, 2024
cbd6fba
[docs] Fix Groq docs
ftnext Dec 8, 2024
5cf6887
[docs] Add Groq but keep DRY
ftnext Dec 8, 2024
b295b5e
[style] Sorry flake8
ftnext Dec 8, 2024
d95f8ba
[chore] Ignore autofunction (as preparation docs improvement)
ftnext Dec 8, 2024
11ee180
Merge pull request #803 from ftnext/tweak-groq-code
ftnext Dec 8, 2024
cd031eb
[feat] Only openai is responsible for OPENAI_API_KEY
ftnext Dec 8, 2024
64fe533
[docs] Tweak OpenAI example
ftnext Dec 8, 2024
8b77fb5
[docs] See openai.recognize()'s docstring (for future)
ftnext Dec 8, 2024
ded2b42
[docs] Tell setting OPENAI_API_KEY
ftnext Dec 8, 2024
b25fd60
[refactor] Rename extra whisper-api -> openai
ftnext Dec 8, 2024
e13ed63
Merge pull request #804 from ftnext/remove-openai-api-key
ftnext Dec 8, 2024
85ba2d2
[chore] Bump up 3.12.0
ftnext Dec 8, 2024
6674045
[docs] Tweak
ftnext Dec 9, 2024
f7e3545
Merge pull request #792 from cclauss/patch-4
ftnext Dec 9, 2024
1f9d8a6
[refactor] Extract lint command
ftnext Dec 12, 2024
9e6f97a
[refactor] Extract rstcheck
ftnext Dec 12, 2024
3f9403b
[docs] Show pipx installation for developers
ftnext Dec 12, 2024
ec491c5
Merge pull request #807 from ftnext/refactor/add-makefile
ftnext Dec 12, 2024
db0da15
Removes Anti Pattern of Assertions for Data Validation
HideyoshiNakazone Dec 18, 2024
8abafcb
style: Fix rstcheck's "Title underline too short."
ftnext Dec 18, 2024
597d09e
Merge pull request #735 from HideyoshiNakazone/add-parameters-google-…
ftnext Dec 18, 2024
ff10eff
[test] Add one case of google-cloud-speech
ftnext Dec 20, 2024
6b46a9b
[chore] Add google-cloud extra
ftnext Dec 20, 2024
27f6d85
[docs] Install with google-cloud extra
ftnext Dec 21, 2024
1df198b
[refactor] Extract google-cloud-speech recognition
ftnext Dec 21, 2024
b8d9f6e
[refactor] Remove dead code
ftnext Dec 21, 2024
b792f18
[refactor] Tweak sut
ftnext Dec 21, 2024
4c66a7b
[docs] Don't Repeat Yourself
ftnext Dec 21, 2024
35447a4
[chore] Add Sphinx support to rstcheck
ftnext Dec 21, 2024
8a2afcf
[style] Format
ftnext Dec 21, 2024
8d33596
[docs] Type hints
ftnext Dec 21, 2024
3e893d5
[test] Google Cloud credentials file case
ftnext Dec 21, 2024
9843278
[test] show_all case
ftnext Dec 21, 2024
6477efa
[bugfix] enableWordTimeOffsets is not supported; snake_case!
ftnext Dec 21, 2024
9aa5504
[test] Cloud Speech-to-Text V1 parameters
ftnext Dec 21, 2024
b04353b
Merge pull request #808 from ftnext/test/google-cloud-speech
ftnext Dec 21, 2024
ac03f3f
[bugfix] Remove trailing space
ftnext Dec 22, 2024
4c2d234
[feat] Delegate to google-auth
ftnext Dec 22, 2024
a97ccb7
[docs] Links to setup local credentials
ftnext Dec 22, 2024
a5a2fb2
[style] Remove unused import
ftnext Dec 22, 2024
9361057
Merge pull request #810 from ftnext/bugfix/recognize-google-cloud-tra…
ftnext Dec 22, 2024
0fb14ff
Merge pull request #811 from ftnext/tweak/google-application-credentials
ftnext Dec 22, 2024
5a86368
[bugfix] ValueError: Unknown field for RecognitionConfig
ftnext Dec 25, 2024
b9fe331
[bugfix] DO NOT use assert as data validation
ftnext Dec 25, 2024
6689acc
[refactor] Rename same as API parameter
ftnext Dec 25, 2024
ce9f12b
[refactor] Extract logic to build config
ftnext Dec 25, 2024
d6afb53
[feat] Migrate to Google ADC (not paste credential JSON)
ftnext Dec 25, 2024
43a440a
[docs] Refine docs
ftnext Dec 25, 2024
9737a76
[docs] Add link to setup Google Cloud project
ftnext Dec 25, 2024
49dc9ad
[docs] Update signature
ftnext Dec 25, 2024
53dccb5
[refactor] Tweak import
ftnext Dec 25, 2024
346ea8c
Merge pull request #812 from ftnext/feat/google-cloud-parameters
ftnext Dec 28, 2024
6f956d0
[chore] Bump up 3.13.0
ftnext Dec 29, 2024
58e62fd
[bugfix] Sphinx reSt not supported in PyPI
ftnext Dec 29, 2024
38b076a
[chore] Make distribution easier a little
ftnext Dec 29, 2024
29aac1e
[refactor] Extract whisper_local
ftnext Dec 29, 2024
73467ba
[docs] Add type hints
ftnext Dec 29, 2024
8d159aa
[docs] Dpn't repeat yourself
ftnext Dec 29, 2024
6fdc043
[docs] Update model parameter
ftnext Dec 29, 2024
fadc9a5
[docs] Type hints for parameters
ftnext Dec 29, 2024
5b67acf
[feat] Refine trascribe parameters
ftnext Dec 29, 2024
a88e099
[refactor] Extract to support Whisper variants in future
ftnext Dec 29, 2024
aae445a
[refactor] Introduce whisper_local package
ftnext Dec 30, 2024
4fd2770
[refactor] Extract whisper_api package
ftnext Dec 30, 2024
72f94a8
[refactor] Apply package structure
ftnext Dec 30, 2024
e9ce763
[docs] Tweak references
ftnext Dec 30, 2024
c0ccb9e
[style] Docstring
ftnext Dec 30, 2024
5ac1263
[chore] Detect Sphinx roles in README.rst
ftnext Dec 30, 2024
97da306
[bugfix] Build on Python 3.9
ftnext Dec 30, 2024
3798033
[test] Use Whisper model response
ftnext Dec 30, 2024
e61f29e
[docs] Define Segment dict
ftnext Dec 30, 2024
48e3ed9
[refactor] Tweak name (not override)
ftnext Dec 30, 2024
46c3b75
[bugfix] Remove unused import
ftnext Dec 30, 2024
5700d3d
[chore] Tweak flake8 options
ftnext Dec 30, 2024
1a56fd5
Merge pull request #813 from ftnext/refactor/whisper-local
ftnext Dec 30, 2024
6761719
[feat] Support faster-whisper with adapter
ftnext Dec 30, 2024
cbca8b9
[refactor] Reduce mock in whisper tests
ftnext Dec 30, 2024
7df1253
[refactor] Test class to add other case easier
ftnext Dec 30, 2024
36b0464
[test] GPU available case
ftnext Dec 30, 2024
3dbbe17
[feat] Specify transcribe's parameters
ftnext Dec 30, 2024
2ee6044
[refactor] Extract AudioData fixture
ftnext Dec 30, 2024
4dd2985
[refactor] Patch sf.read as fixture
ftnext Dec 30, 2024
8b2d91c
[refactor] Extract mock creation into fixtures
ftnext Dec 30, 2024
d502a2e
[docs] Add type hints
ftnext Dec 30, 2024
5da7fdf
[chore] faster-whisper extra
ftnext Dec 30, 2024
5c34084
[docs] Add parameters' type hint
ftnext Dec 30, 2024
5f55e92
[bugfix] show_dict=True
ftnext Dec 30, 2024
a422db0
[docs] Add docstring
ftnext Dec 30, 2024
ec8d05f
[docs] Add faster_whisper in reference
ftnext Dec 30, 2024
4f2506a
[feat] Users can call Recognizer.recognize_faster_whisper()
ftnext Dec 30, 2024
e23338a
[docs] faster-whisper installation
ftnext Dec 30, 2024
3fea948
[bugfix] Install numpy in dev environment
ftnext Dec 30, 2024
070d02f
[bugfix] Run (=skip) tests without faster-whisper
ftnext Dec 30, 2024
0edcc43
[feat] Use device="auto" (default)
ftnext Dec 30, 2024
ef69c4a
[feat] Run manually as e2e
ftnext Dec 30, 2024
ac556c1
[feat] Enable to specify initialization parameters
ftnext Dec 30, 2024
e663cb0
[docs] Fix type hint
ftnext Dec 30, 2024
dd67b7c
Merge pull request #814 from ftnext/feature/faster-whisper
ftnext Dec 30, 2024
94f0f55
[chore] Remove recognize_whisper_api (Use recognize_openai instead)
ftnext Dec 31, 2024
bcd4266
Merge pull request #815 from ftnext/chore/remove-recognize-whisper-api
ftnext Dec 31, 2024
b795baf
chore: Make copyright year of license not need to update
ftnext Jan 4, 2025
f2fc4f7
Merge pull request #818 from ftnext/chore/copyright-year
ftnext Jan 4, 2025
71cacd8
Bump up 3.14.0
ftnext Jan 14, 2025
8afab68
bugfix: Pass CI (ubuntu-latest is now 24.04)
ftnext Jan 14, 2025
cd5f4c4
bugfix: missing replace
ftnext Jan 14, 2025
e4af8de
Merge pull request #820 from Uberi/hotfix-pocketsphinx-test-failure
ftnext Jan 14, 2025
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
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Steps to reproduce
------------------

1. (How do you make the issue happen? Does it happen every time you try it?)
2. (Make sure to go into as much detail as needed to reproduce the issue. Posting your code here can help us resolve the problem much faster!)
3. (If there are any files, like audio recordings, don't forget to include them.)

Expected behaviour
------------------

(What did you expect to happen?)

Actual behaviour
----------------

(What happened instead? How is it different from what you expected?)

```
(If the library threw an exception, paste the full stack trace here)
```

System information
------------------

(Delete all the statements that don't apply.)

My **system** is <INSERT SYSTEM HERE>. (For example, "Ubuntu 16.04 LTS x64", "Windows 10 x64", or "macOS Sierra".)

My **Python version** is <INSERT VERSION HERE>. (You can check this by running `python -V`.)

My **Pip version** is <INSERT VERSION HERE>. (You can check this by running `pip -V`.)

My **SpeechRecognition library version** is <INSERT VERSION HERE>. (You can check this by running `python -c "import speech_recognition as sr;print(sr.__version__)"`.)

My **PyAudio library version** is <INSERT VERSION HERE> / I don't have PyAudio installed. (You can check this by running `python -c "import pyaudio as p;print(p.__version__)"`.)

My **microphones** are: (You can check this by running `python -c "import speech_recognition as sr;print(sr.Microphone.list_microphone_names())"`.)

My **working microphones** are: (You can check this by running `python -c "import speech_recognition as sr;print(sr.Microphone.list_working_microphones())"`.)

I **installed PocketSphinx from** <INSERT SOURCE HERE>. (For example, from the Debian repositories, from Homebrew, or from the source code.)
18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Static analysis

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run flake8
run: make lint
18 changes: 18 additions & 0 deletions .github/workflows/rstcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Ensure RST is well-formed

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
rstcheck:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run rstcheck
run: make rstcheck
59 changes: 59 additions & 0 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Unit tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
strategy:
fail-fast: true
matrix:
include:
- os: ubuntu-22.04
python-version: "3.9"
- os: ubuntu-22.04
python-version: "3.10"
- os: ubuntu-22.04
python-version: "3.11"
- os: ubuntu-22.04
python-version: "3.12"
- os: ubuntu-22.04
python-version: "3.13"
- os: windows-latest
python-version: "3.11"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install build dependencies
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y libpulse-dev libasound2-dev
sudo apt-get install --no-install-recommends -y portaudio19-dev
- name: Install ffmpeg (for Whisper)
uses: FedericoCarboni/setup-ffmpeg@v3
- name: Install Python dependencies (Ubuntu, <=3.12)
if: matrix.os == 'ubuntu-22.04' && matrix.python-version != '3.13'
run: |
python -m pip install .[dev,audio,pocketsphinx,google-cloud,whisper-local,faster-whisper,openai,groq]
- name: Install Python dependencies (Ubuntu, 3.13)
if: matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.13'
run: |
python -m pip install standard-aifc setuptools
python -m pip install --no-build-isolation .[dev,audio,pocketsphinx,google-cloud,openai,groq]
- name: Install Python dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
python -m pip install .[dev,whisper-local,faster-whisper,google-cloud,openai,groq]
- name: Test with unittest
run: |
pytest --doctest-modules -v speech_recognition/recognizers/ tests/
176 changes: 171 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,176 @@
*.egg-info
build
dist
__pycache__
*.pyc
# ----- Python.gitignore -----
# from: https://github.com/github/gitignore/blob/main/Python.gitignore

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# ----- End of Python.gitignore -----

# SpeechRecognition specific .gitignore
speech_recognition/pocketsphinx-data/fr-FR/
speech_recognition/pocketsphinx-data/zh-CN/
fr-FR.zip
zh-CN.zip
it-IT.zip
pocketsphinx-python/
examples/TEST.py
*.geany
*.out
Loading
Loading