# Moved
**[NEW PACKAGE PAGE](https://pypi.org/project/FastDub)**
---
Package for voice over subtitles:
* with the ability to embed in video,
* audio ducking,
* dynamic voice changer for a single track. _Add **--voice-set-anchor** at the beginning of the subtitle line. (Applies
to
all
subsequent ones)_
> pip install -U [FastDub](https://pypi.org/project/FastDub/)
# Install for Ubuntu
> sudo apt update -y && sudo apt upgrade -y
>
> sudo apt install python3 python3-pip ffmpeg [espeak](http://espeak.sourceforge.net/data/) libxml2-dev libxslt1-dev
>
> ; libxml for translator functions
>
> sudo python3 -m pip install -U pip setuptools wheel
>
> sudo python3 -m pip install -U [FastDub](https://pypi.org/project/FastDub/)
# Install all dependencies
> pip install FastDub[ALL] # default
# Youtube support
## Youtube argument group
> pip install FastDub[YT]
### Process all videos from a channel
_To get the channel id if it only has a username, run the JS code in the browser console:_
```javascript
document.querySelector("body>link").href
```
**Then, in the input parameter,
you can pass a link to the channel (with an id, not with a username) or a string of the format "c/CHANNEL_ID"**
_For example:_
> python -m fastdub -i "c/[UCi-5OZ2tYuwMLIcEyOsbdRA](https://www.youtube.com/channel/UCi-5OZ2tYuwMLIcEyOsbdRA)" -yt
## YouTube Search argument group
That the input data was a request to YouTube, they must begin with "?".
_For Example:_
> python -m fastdub -i "?#python" -yt -yts-l 5
## YouTube Upload argument group
> pip install FastDub[YTU]
To download, you need to go to [credentials](https://console.cloud.google.com/apis/credentials) (Create a new project if
needed) > <kbd>+ Create credentials</kbd> > <kbd>OAuth Client ID</kbd> > <kbd>Desktop App</kbd>
After filling in the required fields, <kbd>DOWNLOAD JSON</kbd> format and save to a working folder under the name
_client_secrets.json_
* Specifying the -ytu-ps argument as non-private may result in processing errors, but this was not observed during
testing.
* Please note that video uploads require a large amount of [quota](https://console.cloud.google.com/iam-admin/quotas) (
default has 10,000 per day)
# Subtitles translate
### Translate argument group
> pip install FastDub[TR]
# Usage
> python -m fastdub --help
```
usage: fastdub [-h] [-rc {0,1,2}] [-ra | --cleanup-audio | -n-ra | --no-cleanup-audio] [-l LANGUAGE]
[-tc THREADS_COUNT] -i INPUT [-vf VIDEO_FORMAT] [-sf SUBTITLES_FORMAT] [-En EXCLUDE [EXCLUDE ...]]
[-Eu EXCLUDE_UNDERSCORE] [-sc | --side-chain | -n-sc | --no-side-chain] [-sc-msl MIN_SILENCE_LEN]
[-sc-st SILENCE_THRESH] [-sc-gdo GAIN_DURING_OVERLAY]
[-v {microsoft irina desktop - russian,microsoft zira desktop - english united states),microsoft david desktop - english (united states,aleksandr-hq,arina,artemiy,evgeniy-eng,evgeniy-rus,lyubov,marianna,mikhail,pavel,tatiana,victoria,vitaliy,volodymyr,yuriy}]
[-a ALIGN] [-v-set-a VOICE_SET_ANCHOR] [-ll {trace,debug,verbose,info,warning,error,fatal,panic,quiet}]
[-y | --confirm | -n-y | --no-confirm] [-af AUDIO_FORMAT] [-tb | --traceback | -n-tb | --no-traceback]
[-yt] [-ak API_KEYS [API_KEYS ...]] [-yts] [-yts-l YOUTUBE_SEARCH_LIMIT]
[-yts-rg YOUTUBE_SEARCH_REGION] [-ytu] [-ytu-ps {private,public,unlisted}] [-ytu-t] [-tr]
[--rewrite-srt | --no-rewrite-srt]
[-ts {alibaba,argos,baidu,bing,caiyun,deepl,google,iciba,iflytek,itranslate,lingvanex,mglip,niutrans,papago,reverso,sogou,tencent,translateCom,utibet,yandex,youdao}]
fastdub is a tool for dubbing videos by subtitle files.
options:
-h, --help show this help message and exit
-rc {0,1,2}, --remove-cache {0,1,2}
Remove all cache (_cached_texts directory) files
0 - No remove cache
1 - Delete cache before voice acting
2 - Delete cache after voice acting (default)
-ra, --cleanup-audio, -n-ra, --no-cleanup-audio
Remove result audio if video exists (default: False)
-l LANGUAGE, --language LANGUAGE
Subtitles language (ru)
-tc THREADS_COUNT, --threads-count THREADS_COUNT
Process count to download (pass to cpu count, < 2 to disable)
*N = N * cpu count
Input:
-i INPUT, --input INPUT
Input directory/YouTube Playlist/Video URL.
-vf VIDEO_FORMAT, --video-format VIDEO_FORMAT
Video format (default: .mp4).
-sf SUBTITLES_FORMAT, --subtitles-format SUBTITLES_FORMAT
Subtitles format (default: .srt).
Audio Ducking:
-sc, --side-chain, -n-sc, --no-side-chain
Enable audio side chain compress (ducking) (default: True)
-sc-msl MIN_SILENCE_LEN, --min-silence-len MIN_SILENCE_LEN, --attack MIN_SILENCE_LEN
Minimum silence length in ms (default: 100)
-sc-st SILENCE_THRESH, --silence-thresh SILENCE_THRESH
Silence threshold in dB
-sc-gdo GAIN_DURING_OVERLAY, --gain-during-overlay GAIN_DURING_OVERLAY
Gain during overlay in dB (default: -11)
Voicer:
-v {microsoft irina desktop - russian,microsoft zira desktop - english (united states),microsoft david desktop - english (united states),aleksandr-hq,arina,artemiy,evgeniy-eng,evgeniy-rus,lyubov,marianna,mikhail,pavel,tatiana,victoria,vitaliy,volodymyr,yuriy}, --voice {microsoft irina desktop - russian,microsoft zira desktop - english (united states),microsoft david desktop - english (united states),aleksandr-hq,arina,artemiy,evgeniy-eng,evgeniy-rus,lyubov,marianna,mikhail,pavel,tatiana,victoria,vitaliy,volodymyr,yuriy}
SAPI voice for voice acting.
-a ALIGN, --align ALIGN
Audio fit align (divisor)
1 = right
2 = center (default)
-v-set-a VOICE_SET_ANCHOR, --voice-set-anchor VOICE_SET_ANCHOR
Anchor indicating voice actor change (default "!:")
FFMpeg Output:
-ll {trace,debug,verbose,info,warning,error,fatal,panic,quiet}, --loglevel {trace,debug,verbose,info,warning,error,fatal,panic,quiet}
FFMpegWrapper loglevel
-y, --confirm, -n-y, --no-confirm
Don't ask for confirmation (default: True)
-af AUDIO_FORMAT, --audio-format AUDIO_FORMAT
Out audio files format (default wav)
Terminal Output:
-tb, --traceback, -n-tb, --no-traceback
Show debug traceback (default: False)
YouTube:
-yt, --youtube
-ak API_KEYS [API_KEYS ...], --api-keys API_KEYS [API_KEYS ...]
Youtube API key/s
YouTube Search:
-yts, --youtube-search
The input data is a query for searching on YouTube. (Adds "?" at the start of input)
-yts-l YOUTUBE_SEARCH_LIMIT, --youtube-search-limit YOUTUBE_SEARCH_LIMIT
Sets limit to the number of results. Defaults to 20.
-yts-rg YOUTUBE_SEARCH_REGION, --youtube-search-region YOUTUBE_SEARCH_REGION
Sets the result region. Defaults to "US".
YouTube Upload:
-ytu, --youtube-upload
yt_upload video to YouTube channel after voice acting.
-ytu-ps {private,public,unlisted}, --privacy-status {private,public,unlisted}
Video privacy status (If not private, errors are possible)
-ytu-t, --youtube-upload-translate
Translate title and description on upload. (+ Arguments from translate argument group)
Translate:
-tr, --translate Translate input subtitles files
--rewrite-srt, --no-rewrite-srt
Rewrite input subtitles files.
If not, add "_" to the beginning of the original subtitle file. (default: False)
-ts {alibaba,argos,baidu,bing,caiyun,deepl,google,iciba,iflytek,itranslate,lingvanex,mglip,niutrans,papago,reverso,sogou,tencent,translateCom,utibet,yandex,youdao}, --translate-service {alibaba,argos,baidu,bing,caiyun,deepl,google,iciba,iflytek,itranslate,lingvanex,mglip,niutrans,papago,reverso,sogou,tencent,translateCom,utibet,yandex,youdao}
Subtitle translation service. (default google)
```
**If the voice set after "!:" is not selected during voiceover, clear the cache with the -rc argument**
## Example
> python -m fastdub -i DirToDub -v "[Yuriy](https://rhvoice.su/downloads/?voice=yuriy&type=sapi)" --no-sidechain -sf vtt
> -vf mkv
All files in the folder will be voices (*.mkv, *.vtt)
Default is mp4 video and srt subtitles.
Then:
_name and name2 will be announced, and the results will be saved to a folder with the appropriate name._
## YT Example
> python -m fastdub **-yt** -i https://youtu.be/DD5UKQggXTc
> -v "[Yuriy](https://rhvoice.su/downloads/?voice=yuriy&type=sapi)"
> -l ru
### YouTube Search Example
> python -m fastdub -yt **-yts** -i "#annoyingorange" -l ru
## Translate Example
> python -m fastdub -i DirToDub -tr **-ts iciba** _-l [ru](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)_
Default service is Google.
## Other
### The `fastdub.utils` module stores helper functions.
### python -m pydoc -w fastdub
### You can write your issues on [GitHub](https://github.com/NIKDISSV-Forever/fastdub/issues) in English or in Russian.
Raw data
{
"_id": null,
"home_page": "",
"name": "PyFastDub",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "dubbing,voicing,fastdub,JustDub,SpeedDub,offline,free,easiest,subtitles,videos,veed,fast",
"author": "Nikita (NIKDISSV)",
"author_email": "nikdissv@proton.me",
"download_url": "https://files.pythonhosted.org/packages/7e/ee/d6ae227e2fc339fcaefe66bc0e4fd6aea25fc0f0f64cd71278d173b2538f/PyFastDub-3.1.3.tar.gz",
"platform": null,
"description": "# Moved\n\n**[NEW PACKAGE PAGE](https://pypi.org/project/FastDub)**\n\n---\n\nPackage for voice over subtitles:\n\n* with the ability to embed in video,\n* audio ducking,\n* dynamic voice changer for a single track. _Add **--voice-set-anchor** at the beginning of the subtitle line. (Applies\n to\n all\n subsequent ones)_\n\n> pip install -U [FastDub](https://pypi.org/project/FastDub/)\n\n# Install for Ubuntu\n\n> sudo apt update -y && sudo apt upgrade -y\n>\n> sudo apt install python3 python3-pip ffmpeg [espeak](http://espeak.sourceforge.net/data/) libxml2-dev libxslt1-dev\n>\n> ; libxml for translator functions\n>\n> sudo python3 -m pip install -U pip setuptools wheel\n>\n> sudo python3 -m pip install -U [FastDub](https://pypi.org/project/FastDub/)\n\n# Install all dependencies\n\n> pip install FastDub[ALL] # default\n\n# Youtube support\n\n## Youtube argument group\n\n> pip install FastDub[YT]\n\n### Process all videos from a channel\n\n_To get the channel id if it only has a username, run the JS code in the browser console:_\n\n```javascript\ndocument.querySelector(\"body>link\").href\n```\n\n**Then, in the input parameter,\nyou can pass a link to the channel (with an id, not with a username) or a string of the format \"c/CHANNEL_ID\"**\n\n_For example:_\n\n> python -m fastdub -i \"c/[UCi-5OZ2tYuwMLIcEyOsbdRA](https://www.youtube.com/channel/UCi-5OZ2tYuwMLIcEyOsbdRA)\" -yt\n\n## YouTube Search argument group\n\nThat the input data was a request to YouTube, they must begin with \"?\".\n\n_For Example:_\n\n> python -m fastdub -i \"?#python\" -yt -yts-l 5\n\n## YouTube Upload argument group\n\n> pip install FastDub[YTU]\n\nTo download, you need to go to [credentials](https://console.cloud.google.com/apis/credentials) (Create a new project if\nneeded) > <kbd>+ Create credentials</kbd> > <kbd>OAuth Client ID</kbd> > <kbd>Desktop App</kbd>\n\nAfter filling in the required fields, <kbd>DOWNLOAD JSON</kbd> format and save to a working folder under the name\n_client_secrets.json_\n\n* Specifying the -ytu-ps argument as non-private may result in processing errors, but this was not observed during\n testing.\n\n* Please note that video uploads require a large amount of [quota](https://console.cloud.google.com/iam-admin/quotas) (\n default has 10,000 per day)\n\n# Subtitles translate\n\n### Translate argument group\n\n> pip install FastDub[TR]\n\n# Usage\n\n> python -m fastdub --help\n\n```\nusage: fastdub [-h] [-rc {0,1,2}] [-ra | --cleanup-audio | -n-ra | --no-cleanup-audio] [-l LANGUAGE]\n [-tc THREADS_COUNT] -i INPUT [-vf VIDEO_FORMAT] [-sf SUBTITLES_FORMAT] [-En EXCLUDE [EXCLUDE ...]]\n [-Eu EXCLUDE_UNDERSCORE] [-sc | --side-chain | -n-sc | --no-side-chain] [-sc-msl MIN_SILENCE_LEN]\n [-sc-st SILENCE_THRESH] [-sc-gdo GAIN_DURING_OVERLAY]\n [-v {microsoft irina desktop - russian,microsoft zira desktop - english united states),microsoft david desktop - english (united states,aleksandr-hq,arina,artemiy,evgeniy-eng,evgeniy-rus,lyubov,marianna,mikhail,pavel,tatiana,victoria,vitaliy,volodymyr,yuriy}]\n [-a ALIGN] [-v-set-a VOICE_SET_ANCHOR] [-ll {trace,debug,verbose,info,warning,error,fatal,panic,quiet}]\n [-y | --confirm | -n-y | --no-confirm] [-af AUDIO_FORMAT] [-tb | --traceback | -n-tb | --no-traceback]\n [-yt] [-ak API_KEYS [API_KEYS ...]] [-yts] [-yts-l YOUTUBE_SEARCH_LIMIT]\n [-yts-rg YOUTUBE_SEARCH_REGION] [-ytu] [-ytu-ps {private,public,unlisted}] [-ytu-t] [-tr]\n [--rewrite-srt | --no-rewrite-srt]\n [-ts {alibaba,argos,baidu,bing,caiyun,deepl,google,iciba,iflytek,itranslate,lingvanex,mglip,niutrans,papago,reverso,sogou,tencent,translateCom,utibet,yandex,youdao}]\n\nfastdub is a tool for dubbing videos by subtitle files.\n\noptions:\n -h, --help show this help message and exit\n -rc {0,1,2}, --remove-cache {0,1,2}\n Remove all cache (_cached_texts directory) files\n 0 - No remove cache\n 1 - Delete cache before voice acting\n 2 - Delete cache after voice acting (default)\n -ra, --cleanup-audio, -n-ra, --no-cleanup-audio\n Remove result audio if video exists (default: False)\n -l LANGUAGE, --language LANGUAGE\n Subtitles language (ru)\n -tc THREADS_COUNT, --threads-count THREADS_COUNT\n Process count to download (pass to cpu count, < 2 to disable)\n *N = N * cpu count\n\nInput:\n -i INPUT, --input INPUT\n Input directory/YouTube Playlist/Video URL.\n -vf VIDEO_FORMAT, --video-format VIDEO_FORMAT\n Video format (default: .mp4).\n -sf SUBTITLES_FORMAT, --subtitles-format SUBTITLES_FORMAT\n Subtitles format (default: .srt).\n\nAudio Ducking:\n -sc, --side-chain, -n-sc, --no-side-chain\n Enable audio side chain compress (ducking) (default: True)\n -sc-msl MIN_SILENCE_LEN, --min-silence-len MIN_SILENCE_LEN, --attack MIN_SILENCE_LEN\n Minimum silence length in ms (default: 100)\n -sc-st SILENCE_THRESH, --silence-thresh SILENCE_THRESH\n Silence threshold in dB\n -sc-gdo GAIN_DURING_OVERLAY, --gain-during-overlay GAIN_DURING_OVERLAY\n Gain during overlay in dB (default: -11)\n\nVoicer:\n -v {microsoft irina desktop - russian,microsoft zira desktop - english (united states),microsoft david desktop - english (united states),aleksandr-hq,arina,artemiy,evgeniy-eng,evgeniy-rus,lyubov,marianna,mikhail,pavel,tatiana,victoria,vitaliy,volodymyr,yuriy}, --voice {microsoft irina desktop - russian,microsoft zira desktop - english (united states),microsoft david desktop - english (united states),aleksandr-hq,arina,artemiy,evgeniy-eng,evgeniy-rus,lyubov,marianna,mikhail,pavel,tatiana,victoria,vitaliy,volodymyr,yuriy}\n SAPI voice for voice acting.\n -a ALIGN, --align ALIGN\n Audio fit align (divisor)\n 1 = right\n 2 = center (default)\n -v-set-a VOICE_SET_ANCHOR, --voice-set-anchor VOICE_SET_ANCHOR\n Anchor indicating voice actor change (default \"!:\")\n\nFFMpeg Output:\n -ll {trace,debug,verbose,info,warning,error,fatal,panic,quiet}, --loglevel {trace,debug,verbose,info,warning,error,fatal,panic,quiet}\n FFMpegWrapper loglevel\n -y, --confirm, -n-y, --no-confirm\n Don't ask for confirmation (default: True)\n -af AUDIO_FORMAT, --audio-format AUDIO_FORMAT\n Out audio files format (default wav)\n\nTerminal Output:\n -tb, --traceback, -n-tb, --no-traceback\n Show debug traceback (default: False)\n\nYouTube:\n -yt, --youtube\n -ak API_KEYS [API_KEYS ...], --api-keys API_KEYS [API_KEYS ...]\n Youtube API key/s\n\nYouTube Search:\n -yts, --youtube-search\n The input data is a query for searching on YouTube. (Adds \"?\" at the start of input)\n -yts-l YOUTUBE_SEARCH_LIMIT, --youtube-search-limit YOUTUBE_SEARCH_LIMIT\n Sets limit to the number of results. Defaults to 20.\n -yts-rg YOUTUBE_SEARCH_REGION, --youtube-search-region YOUTUBE_SEARCH_REGION\n Sets the result region. Defaults to \"US\".\n\nYouTube Upload:\n -ytu, --youtube-upload\n yt_upload video to YouTube channel after voice acting.\n -ytu-ps {private,public,unlisted}, --privacy-status {private,public,unlisted}\n Video privacy status (If not private, errors are possible)\n -ytu-t, --youtube-upload-translate\n Translate title and description on upload. (+ Arguments from translate argument group)\n\nTranslate:\n -tr, --translate Translate input subtitles files\n --rewrite-srt, --no-rewrite-srt\n Rewrite input subtitles files.\n If not, add \"_\" to the beginning of the original subtitle file. (default: False)\n -ts {alibaba,argos,baidu,bing,caiyun,deepl,google,iciba,iflytek,itranslate,lingvanex,mglip,niutrans,papago,reverso,sogou,tencent,translateCom,utibet,yandex,youdao}, --translate-service {alibaba,argos,baidu,bing,caiyun,deepl,google,iciba,iflytek,itranslate,lingvanex,mglip,niutrans,papago,reverso,sogou,tencent,translateCom,utibet,yandex,youdao}\n Subtitle translation service. (default google)\n```\n\n**If the voice set after \"!:\" is not selected during voiceover, clear the cache with the -rc argument**\n\n## Example\n\n> python -m fastdub -i DirToDub -v \"[Yuriy](https://rhvoice.su/downloads/?voice=yuriy&type=sapi)\" --no-sidechain -sf vtt\n> -vf mkv\n\nAll files in the folder will be voices (*.mkv, *.vtt)\n\nDefault is mp4 video and srt subtitles.\n\nThen:\n_name and name2 will be announced, and the results will be saved to a folder with the appropriate name._\n\n## YT Example\n\n> python -m fastdub **-yt** -i https://youtu.be/DD5UKQggXTc\n> -v \"[Yuriy](https://rhvoice.su/downloads/?voice=yuriy&type=sapi)\"\n> -l ru\n\n### YouTube Search Example\n\n> python -m fastdub -yt **-yts** -i \"#annoyingorange\" -l ru\n\n## Translate Example\n\n> python -m fastdub -i DirToDub -tr **-ts iciba** _-l [ru](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)_\n\nDefault service is Google.\n\n## Other\n\n### The `fastdub.utils` module stores helper functions.\n\n### python -m pydoc -w fastdub\n\n### You can write your issues on [GitHub](https://github.com/NIKDISSV-Forever/fastdub/issues) in English or in Russian.\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python CLI package for voice over subtitles, with the ability to embed in video, audio ducking, and dynamic voice changer for a single track; auto translating; download and upload to YouTube supports",
"version": "3.1.3",
"split_keywords": [
"dubbing",
"voicing",
"fastdub",
"justdub",
"speeddub",
"offline",
"free",
"easiest",
"subtitles",
"videos",
"veed",
"fast"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "5988aacf57c599ef9f336b2d3832d700",
"sha256": "d7fac2fb8ac1d3cf86b3913a5fca56916b687e0ea50003d0a07478943959fe71"
},
"downloads": -1,
"filename": "PyFastDub-3.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5988aacf57c599ef9f336b2d3832d700",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 50508,
"upload_time": "2022-12-02T14:24:47",
"upload_time_iso_8601": "2022-12-02T14:24:47.965705Z",
"url": "https://files.pythonhosted.org/packages/54/7e/9960a773e0265ba8d80768cdfabaed51f55c41c6ce6e718047da15c47aa7/PyFastDub-3.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "08b0fd0d781f327c83048b7c08143bc9",
"sha256": "0afb1380e8901f270604b9ddede2b75d155f1b9a39fba9e79763cb391e21f811"
},
"downloads": -1,
"filename": "PyFastDub-3.1.3.tar.gz",
"has_sig": false,
"md5_digest": "08b0fd0d781f327c83048b7c08143bc9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 41989,
"upload_time": "2022-12-02T14:24:50",
"upload_time_iso_8601": "2022-12-02T14:24:50.032860Z",
"url": "https://files.pythonhosted.org/packages/7e/ee/d6ae227e2fc339fcaefe66bc0e4fd6aea25fc0f0f64cd71278d173b2538f/PyFastDub-3.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-02 14:24:50",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "pyfastdub"
}