diff --git a/README.md b/README.md index 4455219..9acc83a 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Please, cite us. [ACL Anthology](https://aclanthology.org/2023.ijcnlp-demo.3/), Alternative, less restrictive, but slower backend is [whisper-timestamped](https://github.com/linto-ai/whisper-timestamped): `pip install git+https://github.com/linto-ai/whisper-timestamped` Thirdly, it's also possible to run this software from the [OpenAI Whisper API](https://platform.openai.com/docs/api-reference/audio/createTranscription). This solution is fast and requires no GPU, just a small VM will suffice, but you will need to pay OpenAI for api access. Also note that, since each audio fragment is processed multiple times, the [price](https://openai.com/pricing) will be higher than obvious from the pricing page, so keep an eye on costs while using. Setting a higher chunk-size will reduce costs significantly. -Install with: `pip install openai` +Install with: `pip install openai` , [requires Python >=3.8](https://pypi.org/project/openai/). For running with the openai-api backend, make sure that your [OpenAI api key](https://platform.openai.com/api-keys) is set in the `OPENAI_API_KEY` environment variable. For example, before running, do: `export OPENAI_API_KEY=sk-xxx` with *sk-xxx* replaced with your api key. diff --git a/whisper_online.py b/whisper_online.py index ef43d42..1e68bdb 100644 --- a/whisper_online.py +++ b/whisper_online.py @@ -12,7 +12,7 @@ import math logger = logging.getLogger(__name__) -@lru_cache +@lru_cache(10**6) def load_audio(fname): a, _ = librosa.load(fname, sr=16000, dtype=np.float32) return a