Skip to content

Commit

Permalink
Adding note on ffmpeg + fix for faster whisper on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
raivisdejus committed Aug 10, 2024
1 parent ecb85ae commit c6a0a6a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ OpenAI's [Whisper](https://github.com/openai/whisper).

**PyPI**:

Install [ffmpeg](https://www.ffmpeg.org/download.html)

Install Buzz
```shell
pip install buzz-captions
python -m buzz
Expand Down
6 changes: 3 additions & 3 deletions buzz/transcriber/recording_transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
from typing import Optional
from platformdirs import user_cache_dir

import torch
import numpy as np
import sounddevice
import whisper
import faster_whisper
from sounddevice import PortAudioError
from openai import OpenAI
from PyQt6.QtCore import QObject, pyqtSignal
Expand All @@ -22,8 +23,7 @@
from buzz.transcriber.whisper_cpp import WhisperCpp, whisper_cpp_params
from buzz.transformers_whisper import TransformersWhisper

import whisper
import faster_whisper
import torch # torch has to be imported after faster_whisper to prevent 'libiomp5.dylib' error


class RecordingTranscriber(QObject):
Expand Down
11 changes: 6 additions & 5 deletions buzz/transcriber/whisper_file_transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
import re
import os
import sys
import torch
import platform
from platformdirs import user_cache_dir
from multiprocessing.connection import Connection
from threading import Thread
from typing import Optional, List

import tqdm
import faster_whisper
import whisper
import stable_whisper
from stable_whisper import WhisperResult

from PyQt6.QtCore import QObject

from buzz.conn import pipe_stderr
Expand All @@ -21,10 +25,7 @@
from buzz.transcriber.file_transcriber import FileTranscriber
from buzz.transcriber.transcriber import FileTranscriptionTask, Segment

import faster_whisper
import whisper
import stable_whisper
from stable_whisper import WhisperResult
import torch # torch has to be imported after faster_whisper to prevent 'libiomp5.dylib' error

PROGRESS_REGEX = re.compile(r"\d+(\.\d+)?%")

Expand Down

0 comments on commit c6a0a6a

Please sign in to comment.