Saravanan666/pypi-org huggingface dataset:
Package: whisper-blog-core
WhisperA highly modularized multi-purpose blog engine, based onFlask.InstallationWIPLicenseThe Whisper blog engine is released under GNU Affero General Public License (version 3) from the Free Software Foundation. A copy of the license should be included with every copy of Whisper, you can also read the license texthere.We consider all plugins developed for Whisper constitute a derivative work, though it's still a grey area in law. Thus, writing plugins for Whisper is super-welcomed, as long as they also inherit and is released under AGPLv3. If you feel against this, we suggest you to seek a non-GPL alternative.
Package: whisper-blog-file
whisper.fileFile plugin for Whisper, a highly modularized multi-purpose blog engine.Serve file specified by URL, or specified by post content, or show a list of associated files using main provider.InstallationWIPLicenseThis plugin is released under GNU Affero General Public License (version 3) from the Free Software Foundation, same as the Whisper blog engine as required. A copy of the license should be included with every copy of this plugin, you can also read the license texthere.
Package: whisper-blog-infimum
whisper.infimumA minimalist theme for Whisper, a highly modularized multi-purpose blog engine.InstallationWIPLicenseThis plugin is released under GNU Affero General Public License (version 3) from the Free Software Foundation, same as the Whisper blog engine as required. A copy of the license should be included with every copy of this plugin, you can also read the license texthere.
Package: whisper-blog-markdown
whisper.markdownMarkdown plugin for Whisper, a highly modularized multi-purpose blog engine.Renders markdown and then forward the result to the main provider.InstallationWIPLicenseThis plugin is released under GNU Affero General Public License (version 3) from the Free Software Foundation, same as the Whisper blog engine as required. A copy of the license should be included with every copy of this plugin, you can also read the license texthere.
Package: whisper-cli
Whisper CLIWhisper CLI is a command-line interface for transcribing and translating audio using OpenAI's Whisper API. It also allows you to manage multiple OpenAI API keys as separate environments.To install Whisper CLI, simply run:pipinstallwhisper-cliSetupTo get started with Whisper CLI, you'll need to set your OpenAI API key. You can do this using the following command:whisperkeyset<openai_api_key>This will set the API key for the default environment. If you want to use a different API key, you can set up an alternative environment by running:whisperkeyset<openai_api_key>--env<env_name>To activate an alternative environment, run:whisperenvactivate<env_name>UsageWhisper CLI supports two main functionalities: translation and transcription.TranslationTo translate an audio file, simply run:whispertranslate<file_name>TranscriptionTo transcribe an audio file, run:whispertranscribe<file_name>DevelopmentIf you'd like to contribute to Whisper CLI, you'll need to set up a development environment with Python 3.10.9.python=3.10.9Happy transcribing and translating with Whisper CLI.
Package: whisper-clipboard
Whisper TranscribeWelcome to the Whisper Transcribe repository. This is a simple Python
command line application that allows you to record audio and transcribe it using one of theWhisper ASR models by OpenAI. It uses a terminal user interface, making it easy to use.PrerequisitesPython 3.10 or higher (probably works with lower versions, but not tested)ffmpegInstallation from PyPIpip install whisper-clipboardAnd then runtranscribeand start transcribing.
Please make sure you haveffmpeginstalled properly on your system (this may vary between different operating systems).Installation using the repoFor NixOS Users:# Step 1: Clone the repository.gitclonehttps://github.com/data-stepper/whisper-clipboard# Step 2: cd into the cloned repository.cdwhisper-clipboard# Step 3: Run Nix-shell to set up the environment and install all necessary packages.nix-shell# Step 4: Run the Whisper Transcribe program.pythontranscribe.pyFor Non-NixOS Users:# Step 1: Clone the repository.gitclonehttps://github.com/data-stepper/whisper-clipboard# Step 2: cd into the cloned repository.cdwhisper-clipboard# Step 3: (Optional) Create a virtual environment and activate it.python-mvenvvenvsourcevenv/bin/activate# On Windows, activate the virtual environment with 'venv\Scripts\activate'# Step 4: Install the required packages.pipinstall-rrequirements.txt# Step 5: Run the Whisper Transcribe program.pythontranscribe.pyUsageStart the program usingpythontranscribe.pyAfter starting the program, you will see a prompt ('>').Press 'Space' to start recording. While recording, the terminal will display "Recording..."Press 'Space' again to stop recording. The audio will be saved, and the transcription will be displayed in the terminal and copied to the clipboard.Press 'Q' to quit the application.TroubleshootingEnsure that you have the required version of Python and FFMPEG installed. If you encounter any issues, feel free to create an issue on this repository.Happy transcribing!
Package: whisper-cli-tool
Whisper CLICLI to translate an audiofile on the command-lineSetupBefore to install, make sure you have a OpenAI api key available on your computer PATH.Execute the command below to install thewhisper-cli-toolpython package, which offer thewhispercommand line utility to make transcriptions.$pipinstallwhisper-cli-toolAfter installation, just execute:$whisper--help

usage:whisper[-h][--response-formatRESPONSE_FORMAT][--languageLANGUAGE][--outfileOUTFILE]infile

Dotranscriptionofanaudiofile

positionalarguments:infileInputfilename.Supportedformats:m4a,mp3,webm,mp4,mpga,wav,mpeg.

options:-h,--helpshowthishelpmessageandexit--response-formatRESPONSE_FORMATResponseformat.Supportedformats:text,srt.--languageLANGUAGELanguagetheaudioshouldbetranslatedto--outfileOUTFILEOutputfilenameUsageTo transcribe an audio to portuguese in text format, just execute:$ whisper my-audio.mp3where my-audio.mp3 is your audiofile. The transcribed text will be saved into transcription-output.txtIf you want to change arguments, let's say, change the response format from text to str, just do:$ whisper my-audio.mp3 --response-format str --language pt --outfile my-transcription.mp3
Package: whispercpp
Pybind11 bindings forwhisper.cppQuickstartInstall with pip:pipinstallwhispercppTo use the latest version, install from source:pipinstallgit+https://github.com/aarnphm/whispercpp.gitFor local setup, initialize all submodules:gitsubmoduleupdate--init--recursiveBuild the wheel:# Option 1: using pypa/buildpython3-mbuild-w# Option 2: using bazel./tools/bazelbuild//:whispercpp_wheelInstall the wheel:# Option 1: via pypa/buildpipinstalldist/*.whl# Option 2: using bazelpipinstall$(./tools/bazelinfobazel-bin)/*.whlThe binding provides aWhisperclass:fromwhispercppimportWhisperw=Whisper.from_pretrained("tiny.en")Currently, the inference API is provided viatranscribe:w.transcribe(np.ones((1,16000)))You can useffmpegorlibrosato load audio files into a Numpy array, then pass it totranscribe:importffmpegimportnumpyasnptry:y,_=(ffmpeg.input("/path/to/audio.wav",threads=0).output("-",format="s16le",acodec="pcm_s16le",ac=1,ar=sample_rate).run(cmd=["ffmpeg","-nostdin"],capture_stdout=True,capture_stderr=True))exceptffmpeg.Errorase:raiseRuntimeError(f"Failed to load audio:{e.stderr.decode()}")fromearr=np.frombuffer(y,np.int16).flatten().astype(np.float32)/32768.0w.transcribe(arr)The Pybind11 bindings supports all of the features from whisper.cpp.The binding can also be used viaapi:fromwhispercppimportapictx=api.Context.from_file("/path/to/saved_weight.bin")params=api.Params()ctx.full(arr,params)DevelopmentSeeDEVELOPMENT.mdAPIsWhisperWhisper.from_pretrained(model_name: str)->WhisperLoad a pre-trained model from the local cache or download and cache if needed.w=Whisper.from_pretrained("tiny.en")The model will be saved to$XDG_DATA_HOME/whispercppor~/.local/share/whispercppif the environment variable is
not set.Whisper.transcribe(arr: NDArray[np.float32], num_proc: int = 1)Running transcription on a given Numpy array. This callsfullfromwhisper.cpp. Ifnum_procis greater than 1,
it will usefull_parallelinstead.w.transcribe(np.ones((1,16000)))apiapiis a direct binding fromwhisper.cpp, that has similar APIs towhisper-rs.api.ContextThis class is a wrapper aroundwhisper_contextfromwhispercppimportapictx=api.Context.from_file("/path/to/saved_weight.bin")NoteThe context can also be accessed from theWhisperclass viaw.contextapi.ParamsThis class is a wrapper aroundwhisper_paramsfromwhispercppimportapiparams=api.Params()NoteThe params can also be accessed from theWhisperclass viaw.paramsWhy not?whispercpp.py. There are a few key differences here:They provides the Cython bindings. From the UX standpoint, this achieves the same goal aswhispercpp. The difference iswhispercppuse Pybind11 instead. Feel free to use it if you prefer Cython over Pybind11. Note thatwhispercpp.pyandwhispercppare mutually exclusive, as they also use thewhispercppnamespace.whispercppdoesn’t pollute your$HOMEdirectory, rather it follows theXDG Base Directory Specificationfor saved weights.Usingcdllandctypesand be done with it?This is also valid, but requires a lot of hacking and it is pretty slow comparing to Cython and Pybind11.
Package: whisper-cpp-cdll
whisper.cpp.cdllQuick Start1. Install whisper.cppgitclonehttps://github.com/ggerganov/whisper.cppcdwhisper.cpp
maketiny
makelibwhisper.so2. Install whisper_cpp_cdllpipinstallwhisper_cpp_cdll3. Usagefromwhisper_cpp_cdll.coreimportrun_whisperfromwhisper_cpp_cdll.utilimportread_audio# your whisper.cpp files pathlibname='./whisper.cpp/libwhisper.so'fname_model='./whisper.cpp/models/ggml-tiny.bin'd=read_audio('./whisper.cpp/samples/jfk.wav')result=run_whisper(data=d,libname=libname,fname_model=fname_model,language=b'en')#=> [{'segment_id': 0, 'text': ' And so my fellow Americans ask not what your country can do for you ask what you can do for your country.', 'start': 0, 'end': 176000, 'tokens': [{..}]},..... ]
Package: whispercpp-py
Pybind11 bindings forwhisper.cppQuickstartInstall with pip:pipinstallwhispercppTo use the latest version, install from source:pipinstallgit+https://github.com/aarnphm/whispercpp.gitFor local setup, initialize all submodules:gitsubmoduleupdate--init--recursiveBuild the wheel:# Option 1: using pypa/buildpython3-mbuild-w# Option 2: using bazel./tools/bazelbuild//:whispercpp_wheelInstall the wheel:# Option 1: via pypa/buildpipinstalldist/*.whl# Option 2: using bazelpipinstall$(./tools/bazelinfobazel-bin)/*.whlThe binding provides aWhisperclass:fromwhispercppimportWhisperw=Whisper.from_pretrained("tiny.en")Currently, the inference API is provided viatranscribe:w.transcribe(np.ones((1,16000)))You can useffmpegorlibrosato load audio files into a Numpy array, then pass it totranscribe:importffmpegimportnumpyasnptry:y,_=(ffmpeg.input("/path/to/audio.wav",threads=0).output("-",format="s16le",acodec="pcm_s16le",ac=1,ar=sample_rate).run(cmd=["ffmpeg","-nostdin"],capture_stdout=True,capture_stderr=True))exceptffmpeg.Errorase:raiseRuntimeError(f"Failed to load audio:{e.stderr.decode()}")fromearr=np.frombuffer(y,np.int16).flatten().astype(np.float32)/32768.0w.transcribe(arr)The Pybind11 bindings supports all of the features from whisper.cpp.The binding can also be used viaapi:fromwhispercppimportapictx=api.Context.from_file("/path/to/saved_weight.bin")params=api.Params()ctx.full(arr,params)DevelopmentSeeDEVELOPMENT.mdAPIsWhisperWhisper.from_pretrained(model_name: str)->WhisperLoad a pre-trained model from the local cache or download and cache if needed.w=Whisper.from_pretrained("tiny.en")The model will be saved to$XDG_DATA_HOME/whispercppor~/.local/share/whispercppif the environment variable is
not set.Whisper.transcribe(arr: NDArray[np.float32], num_proc: int = 1)Running transcription on a given Numpy array. This callsfullfromwhisper.cpp. Ifnum_procis greater than 1,
it will usefull_parallelinstead.w.transcribe(np.ones((1,16000)))apiapiis a direct binding fromwhisper.cpp, that has similar APIs towhisper-rs.api.ContextThis class is a wrapper aroundwhisper_contextfromwhispercppimportapictx=api.Context.from_file("/path/to/saved_weight.bin")NoteThe context can also be accessed from theWhisperclass viaw.contextapi.ParamsThis class is a wrapper aroundwhisper_paramsfromwhispercppimportapiparams=api.Params()NoteThe params can also be accessed from theWhisperclass viaw.paramsWhy not?whispercpp.py. There are a few key differences here:They provides the Cython bindings. From the UX standpoint, this achieves the same goal aswhispercpp. The difference iswhispercppuse Pybind11 instead. Feel free to use it if you prefer Cython over Pybind11. Note thatwhispercpp.pyandwhispercppare mutually exclusive, as they also use thewhispercppnamespace.whispercppdoesn’t pollute your$HOMEdirectory, rather it follows theXDG Base Directory Specificationfor saved weights.Usingcdllandctypesand be done with it?This is also valid, but requires a lot of hacking and it is pretty slow comparing to Cython and Pybind11.
Package: whisper-cpp-python
whisper-cpp-pythonwhisper-cpp-python is a Python module inspired byllama-cpp-pythonthat provides a Python interface to thewhisper.cppmodel.
This module automatically parses the C++ header file of the project during building time, generating the corresponding Python bindings.InstallationTo install the module, you can use pip:pipinstallwhisper-cpp-pythonUsageTo use the module, you need to create an instance of theWhisperclass, passing the path to the model file as a parameter. Then, you can call thetranscribeortranslatemethod to transcribe or translate a given audio file.High-level APIThe high-level API provides a simple managed interface through theWisperclass.Below is a short example demonstrating how to use the high-level API to transcribe an mp3:>>>fromwhisper_cpp_pythonimportWhisper>>>whisper=Whisper(model_path="./models/ggml-tiny.bin")>>>output=whisper.transcribe(open('samples/jfk.mp3'))>>>print(output){'text':'And so my fellow Americans ask not what your country can do for you, ask what you can do for your country.'}>>>output=whisper.transcribe(open('samples/jfk.mp3'),response_format='verbose_json')>>>print(output){'task':'transcribe','language':'en','duration':11.0,'text':'And so, my fellow Americans ask not what your country can do for you, ask what you can do for your country.','segments':[{'id':0,'seek':0.0,'start':0.0,'end':10.98,'text':' And so, my fellow Americans ask not what your country can do for you, ask what you can do for your country.','tokens':[50364,400,370,11,452,7177,6280,1029,406,437,428,1941,393,360,337,291,11,1029,437,291,393,360,337,428,1941,13,50913],'temperature':0.800000011920929,'avg_logprob':-0.3063158459133572,'compression_ratio':2.4000000953674316,'no_speech_prob':0.0,'transient':False}]}Low-level APIAll interfaces provided bywhisper.hare available in python. The following example
show how to pass a customprogress_callbackfunction to the model.fromwhisper_cpp_pythonimportWhisperfromwhisper_cpp_python.whisper_cppimportwhisper_progress_callbackdefcallback(ctx,state,i,p):print(i)model=Whisper('../quantized_models/whisper/models/ggml-tiny.bin')model.params.progress_callback=whisper_progress_callback(callback)print(model.transcribe('vendor/whisper.cpp/samples/jfk.wav'))Web Serverwhisper-cpp-pythonoffers a web server which aims to act as a drop-in replacement for the OpenAI API.
This allows you to use whisper.cpp compatible models with any OpenAI compatible client (language libraries, services, etc).To install the server package and get started:pipinstallwhisper-cpp-python[server]python3-mwhisper_cpp_python.server--modelmodels/ggml-tiny.binNavigate tohttp://localhost:8001/docsto see the OpenAPI documentation.Licensewhisper-cpp-python is released under the MIT License. SeeLICENSEfor details.
Package: whisper-dictation
Whisper-dictationThis is an app using openai's whisper to dictate on KDE wayland.The project is designed as a dictation server that runs at background (To avoid the time to load model each time starts the dictation) and a client to toggle if the server should be recording. You can assign a shortcut to toggle the server to start/stop the recording (whisper_dicatation --language [language_code]).Whenever the dictation is stopped, the content will be sent to your clipboard and a notification will be displayed.The project depends on thekdialogpackageandwl-copy(fromwl-clipboardpackage).This project is designed to work on KDE wayland. Other wayland platforms might work as well, but without the ability to send a notification.InstallationInstall using pip:pip install whisper_dictationNote that it is recommended to install at user directory (not globally). Since the systemd service provided is written only for executable at~/.local/binUsageTo start the project manually, you should use two terminals, for the server:whisper_dictation daemon [--port 9000] [--model_name base]Seewhisper_dictation daemon --helpfor all the available modelsYou can use a command to trigger the daemon, or assign a shortcut to this command in order to use it. Press once for start, and press the second time to stop the recording.whisper_dictation say [--language en]You should assign a language code, it can help with the performance especially using a small model.Alternatively, you can use the systemd service unit provided inside this repo to make the daemon running in the background. Place it in your~/.config/systemd/user/, enable and start it:systemctl --user enable whisper_dictation
systemctl --user start whisper_dictationTODOadd system integration for a shortcut to start/stop dictationoutput the dictation to where the cursor is (planned as fcitx addon).optional(A system tray)package it on aurRequirementswl-clipboardkdialog
Package: whisperEngine
This is a package of the whisper engine that you can install and use
without complicated initialization and construction processes.First you need to install the FastWhishper environment:
pip install faster-whisperHow to use it:size = "large-v2"
model = "model_path"
language = "zh"
whisper = whisperEngine(size, model, language)
whisper.load_model()
text = whisper.do_transcribe(audio_file)model language default chinese:
chinese (zh)
english (en)
Package: whisperer-ml
whispererGo from raw audio files to a speaker separated text-audio datasets automatically.Table of ContentsSummaryKey FeaturesInstalationHow to use:Using Multiple-GPUSConfigurationTo DoAcknowledgementsSummaryThis repo takes a directory of audio files and converts them to a text-audio dataset with normalized distribution of audio lengths.SeeAnalyzeDataset.ipynbfor examples of the dataset distributions across audio and text lengthThe output is a text-audio dataset that can be used for training a speech-to-text model or text-to-speech.
The dataset structure is as follows:│── /dataset
│   ├── metadata.txt
│   └── wavs/
│      ├── audio1.wav
│      └── audio2.wavmetadata.txtpeters_0.wav|Beautiful is better than ugly.
peters_1.wav|Explicit is better than implicit.Key FeaturesAudio files are automatically split by speakersSpeakers are auto-labeled across the filesAudio splits on silencesAudio splitting is configurableThe dataset creation is done so that it follows Gaussian-like distributions on clip length. Which, in turn, can lead to Gaussian-like distributions on the rest of the dataset statistics. Of course, this is highly dependent on your audio sources.Leverages the GPUs available on your machine. GPUs also be set explicitly if you only want to use some.InstalationYou have two optionsInstall from PyPi with pippip install whisperer-mlUser Friendly WebAppWhisperer WebNote:Under Development but ready to be usedHow to use:Create data folder and move audio files to itmkdir data data/raw_filesThere are four commandsConvertwhisperer_ml convert path/to/data/raw_filesDiarizewhisperer_ml diarize path/to/data/raw_filesAuto-Labelwhisperer_ml auto-label path/to/data/raw_files number_speakersTranscribewhisperer_ml transcribe path/to/data/raw_files your_dataset_nameHelp lists all commandswhisperer_ml --helpYou can run help on a specific commandwhisperer_ml convert --helpUse theAnalyseDataset.ipynbnotebook to visualize the distribution of the datasetUse theAnalyseSilence.ipynbnotebook to experiment with silence detection configurationUsing Multiple-GPUSThe code automatically detects how many GPU's are available and distributes the audio files indata/wav_filesevenly across the GPUs.
The automatic detection is done throughnvidia-smi.You can to make the available GPU's explicit by setting the environment variableCUDA_AVAILABLE_DEVICES.ConfigurationModifyconfig.pyfile to change the parameters of the dataset creation. Including silence detection.To DoSpeech DiarizationReplace click with typerAcknowledgementsAnalyseDataset.ipynb adapted from coqui-ai exampleOpenAI WhisperPyAnnoteSpeechBrain
Package: whisper-mic
Whisper MicThis repo is based on the work donehereby OpenAI.  This repo allows you use use a mic as demo. This repo copies some of the README from the original project.Video TutorialThe latest video tutorial for this repo can be seenhereAn older video tutorial for this repo can be seenhereProfessional AssistanceIf are in need of paid professional help, that is available through thisemailSetupNow a pip package!Create a venv of your choice.Runpip install whisper-micAvailable models and languagesThere are five model sizes, four with English-only versions, offering speed and accuracy tradeoffs. Below are the names of the available models and their approximate memory requirements and relative speed.SizeParametersEnglish-only modelMultilingual modelRequired VRAMRelative speedtiny39 Mtiny.entiny~1 GB~32xbase74 Mbase.enbase~1 GB~16xsmall244 Msmall.ensmall~2 GB~6xmedium769 Mmedium.enmedium~5 GB~2xlarge1550 MN/Alarge~10 GB1xFor English-only applications, the.enmodels tend to perform better, especially for thetiny.enandbase.enmodels. We observed that the difference becomes less significant for thesmall.enandmedium.enmodels.Microphone DemoYou can use the model with a microphone using thewhisper_micprogram.  Use-hto see flag options.Some of the more important flags are the--modeland--englishflags.Transcribing To A FileUsing the command:whisper_mic --loop --dictatewill type the words you say on your active cursor.Usage In Other ProjectsYou can use this code in other projects rather than just use it for a demo.  You can do this with thelistenmethod.fromwhisper_micimportWhisperMicmic=WhisperMic()result=mic.listen()print(result)Check out what the possible arguments are by looking at thecli.pyfileTroubleshootingIf you are having issues, try the following:sudo apt install portaudio19-dev python3-pyaudioContributingSome ideas that you can add are:Supporting different implementations of WhisperAdding additional optional functionality.Use Pyaudio to get the audio for the listen method to speed things upLicenseThe model weights of Whisper are released under the MIT License. See their repo for more information.This code under this repo is under the MIT license.  SeeLICENSEfor further details.ThanksUntil recently, access to high performing speech to text models was only available through paid serviecs.  With this release, I am excited for the many applications that will come.