Package: bragir
BragirDescriptionThe bragir CLI is a command-line application built using Click. Its primary purpose is to handle and generate SubRip Subtitle (SRT) files using ChatGPT and Whisper from Openai.FeaturesTranslation:Translate the content of SRT files from one language to another using ChatGPT.Transcription:Trancribe the content of video and audio files from one language to another using Whisper.Batch Processing:Process a single file, multiple files, or an entire directory, providing flexibility and efficiency.Easy-to-Use Interface:Utilize a user-friendly command-line interface powered by Click, making translation tasks straightforward.Table of ContentsBragirDescriptionFeaturesTable of ContentsInstallationFFmpegMacosLinuxWindowsOpenAIBragirUsageExamplesContributingLicenseInstallationIn order to use the full potential of Bragir, FFmpeg is needed to be installed on the system and you need to obtain an Openai key.FFmpegMacosUsing brewbrewinstallffmpegLinuxUpdate avaiable linux packagessudoaptupdateInstall ffmpegsudoaptinstallffmpegWindowsDownload the .exe from officialffmpeg-websiteExtract the contents of the zip file and rename the file to FFmpeg.Move the folder into the main drive (Usually c:/)Open command prompt as administrator, and add FFmpeg to your system pathsetx/mPATH"C:\ffmpeg\bin;%PATH%"Verifyting the installationIn order to see if the installation of FFmpeg is correct, run the following commandffmpeg--versionIf a version is displayed, then FFmpeg is installed correctly.OpenAICurrently, this tool relise on OpenAIs API. That means that an OpenAI api-key is crucial. See the following resource ofhow to get an OpenAI api-keyBragirUse pip to install BragirpipinstallbragirCheck if installation is completebragir --versionIf a version is displayed, then Bragir is installed correctly.UsageBragir comes with two commands, transcribe and translate. Transcribe will always generate an file with extension.srt. The translate command has only been tested with SRT-files, however other files would work. However, Bragir is not intended to translate other file typesIn order to use either command, a Openai needs to be loaded into the terminal session or as an flag to the command.Load Openai key as an enviroment variable into current sessionexport OPENAI_KEY=<VALUE>Flag in command:bragir translate ... --api_key <VALUE>ExamplesTranslate a single file to one language:bragir translate --file_path <FILE_PATH> --language frTranslate multiple files to multiple languages:bragir translate --file_path <FILE_PATH> --file_path <FILE_PATH> --language French --language GermanTranslate files in a directory to multiple languages:bragir translate --directory <DIRECTORY_PATH> --language French --language German --api_key <OPENAI_KEY>Transcribe file:bragir transcribe --file_path <FILE_PATH> --api_key <OPENAI_KEY>Transcribe files in a directory:bragir transcribe --directory <DIRECTORY_PATH> --api_key <OPENAI_KEY>ContributingIf you want to contribute to this project, please use the following steps:Fork the project.Create a new branch (git checkout -b feature/awesome-feature).Commit your changes (git commit -m 'Add some feature').Push to the branch (git push origin feature/awesome-feature).Open a pull request.LicenseThis project is licensed under the MIT License.