collabora / WhisperFusion

WhisperFusion builds upon the capabilities of WhisperLive and WhisperSpeech to provide a seamless conversations with an AI.
1.45k stars 101 forks source link

Fixed Bugs when Running Demo on Mac #21

Closed DamianB-BitFlipper closed 5 months ago

DamianB-BitFlipper commented 5 months ago

When running the Demo on Mac on Chrome, the code was not entirely correct.

Firstly, whisper-live has some bugs with a buffer overflowing on macs. This was fixed on the latest version. Rather than shipping a copy of the library, I simply added whisper-live to the requirements.txt with the latest version pinned.

Secondly, the number of channels in the audio-proessor.js should be set to the minimum of input and output. This is following the official Mozilla documentation.

Lastly, I made the user displayed when interacting with the Demo the best placeholder individual: Alan Turing. The image is licensed freely for private and commercial use.

DamianB-BitFlipper commented 5 months ago

Oh I see. I didn't realize you made local changes. I just thought that whisper-live was not on PyPI when you were writing this service.

I would suggest one code change: make the whisper_live a submodule and track a fork of it with your modifications. This way, it is easier to keep up-to-date with the latest versions on their side. This is mainly because they fixed a bug which affects MacOS. I can modify the PR tomorrow to follow this approach if you think it is reasonable.

zoq commented 5 months ago

I think a submodule makes sense, yes, makes it easier to keep everything in sync.

DamianB-BitFlipper commented 5 months ago

Hi @zoq,

I'm starting to make the submodule approach, but there are changes that I do not exactly know if I should include or exclude when doing a diff of whisper_live and the latest WhisperLive version. Would you be able to perform this merge.

Otherwise, the rest of this PR has some relevant changes:

DamianB-BitFlipper commented 5 months ago

I reorganized me fork to merge this changes from a branch. Closing this PR as a duplicate because of #24