Skip to content

Commit

Permalink
Fix types, linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ehennenfent committed Jan 27, 2024
1 parent 689dfce commit 808abc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
sudo apt install portaudio19-dev
pip install .[dev]
- name: Lint imports
run: isort .
run: isort --check .
- name: Lint formatting
run: black .
run: black --check .
- name: Lint semantics
run: ruff .
- name: Lint types
Expand Down
4 changes: 2 additions & 2 deletions live_illustrate/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@


class AudioTranscriber(AsyncThread):
def __init__(self, model: str, phrase_timeout: int) -> None:
def __init__(self, model: str, phrase_timeout: float) -> None:
super().__init__("AudioTranscriber")

self.recorder = sr.Recognizer()
self.source = sr.Microphone(sample_rate=SAMPLE_RATE)
self.model = model
self.phrase_timeout = phrase_timeout * 60
self.phrase_timeout = int(phrase_timeout * 60)

self.recorder.dynamic_energy_threshold = DYNAMIC_ENERGY_THRESHOLD

Expand Down

0 comments on commit 808abc1

Please sign in to comment.