Skip to content

Commit

Permalink
Clarify the dead batteries workaround for Python >= 3.13
Browse files Browse the repository at this point in the history
```
try:
    import aifc
    import audioop
except ModuleNotFoundError as e:
    raise ModuleNotFoundError("Please run: pip install audioop-lts standard-aifc") from e
```
https://docs.python.org/3.13/whatsnew/3.13.html#whatsnew313-pep594
  • Loading branch information
cclauss committed Nov 11, 2024
1 parent 73c8cdf commit 2296bd2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions speech_recognition/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@

from __future__ import annotations

import aifc
import audioop
try:
import aifc
import audioop
except ModuleNotFoundError:
raise ModuleNotFoundError("Please run: pip install audioop-lts standard-aifc")
import base64
import collections
import hashlib
Expand Down

0 comments on commit 2296bd2

Please sign in to comment.