Skip to content

BF: Fix whisper transcriber sometimes being initialised twice (and breaking as a result)#6796

Merged
TEParsons merged 1 commit intopsychopy:releasefrom
TEParsons:release-bf-safe-load-transcriber
Aug 19, 2024
Merged

BF: Fix whisper transcriber sometimes being initialised twice (and breaking as a result)#6796
TEParsons merged 1 commit intopsychopy:releasefrom
TEParsons:release-bf-safe-load-transcriber

Conversation

@TEParsons
Copy link
Copy Markdown
Contributor

Because psychopy-whisper defines an entry point targeting its transcriber, whisper is initialised whenever activatePlugins is called. Because the PsychoPy app runs in a different process to experiments, running a whisper experiment from Builder was loading whisper's DLLs twice in two processes, which whisper doesn't like.

The reason the entry point was needed is that psychopy.sound.setupTranscriber needs to know what class to setup from name, and to detect this it needed to have been loaded via entry point. The solution is to not refer to it by name from Builder, and instead simply give the full path as a string (so that setupTranscriber can then import it from the string).

Accompanying commit in the psychopy-whisper repo:
psychopy/psychopy-whisper@4d82ae4
(we'll need to do a release of this to match)

@TEParsons TEParsons requested a review from mdcutone August 15, 2024 14:21
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 15 lines in your changes missing coverage. Please review.

Project coverage is 49.62%. Comparing base (56ec168) to head (e264294).
Report is 17 commits behind head on release.

Additional details and impacted files
@@             Coverage Diff             @@
##           release    #6796      +/-   ##
===========================================
- Coverage    49.64%   49.62%   -0.02%     
===========================================
  Files          332      332              
  Lines        61129    61172      +43     
===========================================
+ Hits         30345    30356      +11     
- Misses       30784    30816      +32     
Components Coverage Δ
app ∅ <ø> (∅)
boilerplate ∅ <ø> (∅)
library ∅ <ø> (∅)
vm-safe library ∅ <ø> (∅)

@TEParsons TEParsons merged commit b064098 into psychopy:release Aug 19, 2024
@TEParsons TEParsons deleted the release-bf-safe-load-transcriber branch October 4, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant