Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebase against your -np changes (thx) and add better python file to be used on the command line or as library #1744

Merged

Conversation

contractorwolf
Copy link
Contributor

can be used on the command line like this:

python whisper_processor.py "./audio/wake_word_detected16k.wav"

or included in a python file like this:

import whisper_processor

try:
    result = whisper_processor.process_audio("./audio/wake_word_detected16k.wav", "base.en")
    print(result)
except Exception as e:
    print(f"Error: {e}")

see test_whisper_processor.py for example, adjust paths as necessary

@contractorwolf
Copy link
Contributor Author

any chance on getting this in @ggerganov? I would really like it if I could say I contributed to this great project

@ggerganov
Copy link
Owner

Create a folder examples/processor.py, move the files there and we can merge

@ggerganov ggerganov merged commit a13a7da into ggerganov:master Jan 13, 2024
bygreencn added a commit to bygreencn/whisper.cpp that referenced this pull request Jan 16, 2024
* ggerganov/master: (86 commits)
  server : fix building and simplify lib deps on Windows (ggerganov#1772)
  talk-llama : sync llama.cpp
  talk-llama : llama.cpp
  sync : ggml
  metal : correctly set SIMD support flags on iOS (llama/4923)
  2-bit quantizations (llama/4897)
  scripts : sync-ggml-am.sh add option to skip commits
  talk-llama : sync llama.cpp
  sync : ggml
  examples : adapt to metal API
  ggml: cache sin/cos for RoPE (llama/4908)
  metal : remove old API (llama/4919)
  metal : disable log for loaded kernels (llama/4794)
  gguf : fix potential infinite for-loop (llama/4600)
  metal : refactor kernel loading code (llama/4794)
  CUDA: faster q8_0 -> f16 dequantization (llama/4895)
  talk-llama : add optional CLI arg to set the bot name (ggerganov#1764)
  examples : add python example for transcription (ggerganov#1744)
  whisper : load the model into multiple buffers of max size 1GB (ggerganov#1763)
  talk-llama : sync llama.cpp
  ...
jiahansu pushed a commit to WiseSync/whisper.cpp that referenced this pull request Apr 17, 2024
* rebase and add simple python interface

* moved python files to examples/python
viktor-silakov pushed a commit to viktor-silakov/whisper_node_mic.cpp that referenced this pull request May 11, 2024
* rebase and add simple python interface

* moved python files to examples/python
iThalay pushed a commit to iThalay/whisper.cpp that referenced this pull request Sep 23, 2024
* rebase and add simple python interface

* moved python files to examples/python
iThalay pushed a commit to iThalay/whisper.cpp that referenced this pull request Sep 23, 2024
* rebase and add simple python interface

* moved python files to examples/python
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.

2 participants