diff options
| author | yum <yum.food.vr@gmail.com> | 2023-03-08 15:36:46 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2023-03-08 15:36:46 -0800 |
| commit | 12b6447a87da8077c7dd12b92eefc27dcf7f0818 (patch) | |
| tree | 7e04fdfb24ae1fd9e9ae3f754018f3cb54020c40 /Scripts | |
| parent | b6dc76afb4f76a8b0eaa8f821c557cd83f69daf4 (diff) | |
Set PYTHONPATH in synchronous multiprocessing layer
A user saw an error like `ModuleNotFoundError: No module named _socket`.
StackOverflow blames this on PYTHONPATH, so let's try setting it.
* Fix latent bug in Scripts/transcribe.py. PyAudio.open() positional
parameters must be specified in correct order, even when telling it
which parameter is which. *shrug*
Diffstat (limited to 'Scripts')
| -rw-r--r-- | Scripts/transcribe.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Scripts/transcribe.py b/Scripts/transcribe.py index c4d7682..6793336 100644 --- a/Scripts/transcribe.py +++ b/Scripts/transcribe.py @@ -167,8 +167,10 @@ def getMicStream(which_mic): # Bind audio_state to onAudioFramesAvailable callback = partial(onAudioFramesAvailable, audio_state, input_rate) - audio_state.stream = audio_state.p.open(format=audio_state.FORMAT, - channels=audio_state.CHANNELS, rate=input_rate, + audio_state.stream = audio_state.p.open( + rate=input_rate, + channels=audio_state.CHANNELS, + format=audio_state.FORMAT, input=True, frames_per_buffer=audio_state.CHUNK, input_device_index=device_index, stream_callback=callback) |
