Skip to content

Commit

Permalink
Merge branch 'dev' into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
BingLingGroup committed Mar 4, 2020
2 parents 67f71e5 + d463e17 commit db0850c
Show file tree
Hide file tree
Showing 28 changed files with 1,521 additions and 782 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ MANIFEST
/.build_and_dist_win32
/.release
*.po~
*.mo
Pipfile
*.lock
26 changes: 23 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## TOC

- [Unreleased](#unreleased)
- [0.5.5-alpha - 2020-03-04](#055-alpha---2020-03-04)
- [Added](#added055-alpha)
- [Changed](#changed055-alpha)
- [0.5.4-alpha - 2020-01-31](#054-alpha---2020-01-31)
- [Added](#added054-alpha)
- [Changed](#changed054-alpha)
Expand All @@ -32,7 +34,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Click up arrow to go back to TOC.

### Unreleased
### [0.5.5-alpha] - 2020-03-04

#### Added(0.5.5-alpha)

- Add Google Cloud Speech-to-Text API Recognition Config json file input support.
- Add Speech-to-Text API recognition result json file output support. [issue #76](https://github.com/BingLingGroup/autosub/issues/76)
- Add exception when receiving error from [Google-Speech-v2](https://github.com/gillesdemey/google-speech-v2).
- Add Nuitka compatibility codes to stop program compiled by Nuitka when using Google Cloud service account credentials. [Nuitka pkg_resources.DistributionNotFound error](https://github.com/Nuitka/Nuitka/issues/146)

#### Changed(0.5.5-alpha)

- Fix high memory/RAM usage partially by terminating child processes, lowering default multiprocessing counts and using `gc.collect(0)`. [issue #67](https://github.com/BingLingGroup/autosub/issues/67), [issue #74](https://github.com/BingLingGroup/autosub/issues/74)
- Fix dependency finding issue. [issue #82](https://github.com/BingLingGroup/autosub/issues/82)
- Fix ass override tags translation issue. [issue #79](https://github.com/BingLingGroup/autosub/issues/79)

### [0.5.4-alpha] - 2020-01-31

Expand All @@ -46,6 +61,8 @@ Click up arrow to go back to TOC.
- Fix output format limits when input is a subtitles file.
- Remove gtransv2 support.

<escape><a href = "#TOC">&nbsp;&nbsp;</a></escape>

### [0.5.3-alpha] - 2019-12-30

#### Changed(0.5.3-alpha)
Expand All @@ -54,6 +71,8 @@ Click up arrow to go back to TOC.
- Fix Auditok option issues. [issue #70](https://github.com/BingLingGroup/autosub/issues/70)
- Fix output option issue. [issue #73](https://github.com/BingLingGroup/autosub/issues/73)

<escape><a href = "#TOC">&nbsp;&nbsp;</a></escape>

### [0.5.2-alpha] - 2019-11-05

#### Added(0.5.2-alpha)
Expand Down Expand Up @@ -171,7 +190,8 @@ Click up arrow to go back to TOC.

<escape><a href = "#TOC">&nbsp;&nbsp;</a></escape>

[Unreleased]: https://github.com/BingLingGroup/autosub/compare/0.5.4-alpha...HEAD
[Unreleased]: https://github.com/BingLingGroup/autosub/compare/0.5.5-alpha...HEAD
[0.5.5-alpha]: https://github.com/BingLingGroup/autosub/compare/0.5.4-alpha...0.5.5-alpha
[0.5.4-alpha]: https://github.com/BingLingGroup/autosub/compare/0.5.3-alpha...0.5.4-alpha
[0.5.3-alpha]: https://github.com/BingLingGroup/autosub/compare/0.5.2-alpha...0.5.3-alpha
[0.5.2-alpha]: https://github.com/BingLingGroup/autosub/compare/0.5.1-alpha...0.5.2-alpha
Expand Down
271 changes: 216 additions & 55 deletions README.md

Large diffs are not rendered by default.

29 changes: 15 additions & 14 deletions autosub/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def main(): # pylint: disable=too-many-branches, too-many-statements, too-many-
os.environ['proxy_password'] = args.proxy_password

try:
if args.speech_config:
cmdline_utils.validate_config_args(args)

if cmdline_utils.list_args(args):
raise exceptions.AutosubException(_("\nAll works done."))

Expand All @@ -65,16 +68,16 @@ def main(): # pylint: disable=too-many-branches, too-many-statements, too-many-
validate_result = cmdline_utils.validate_io(args, styles_list)

if validate_result == 0:
ffmpeg_cmd = ffmpeg_utils.get_cmd("ffmpeg")
if not ffmpeg_cmd:
if not constants.FFMPEG_CMD:
raise exceptions.AutosubException(
_("Error: Dependency ffmpeg"
" not found on this machine."))
if not constants.FFPROBE_CMD:
raise exceptions.AutosubException(
_("Error: Dependency ffprobe"
" not found on this machine."))

ffmpeg_cmd = ffmpeg_cmd + ' '

cmdline_utils.fix_args(args,
ffmpeg_cmd=ffmpeg_cmd)
cmdline_utils.fix_args(args)

if args.audio_process:
args.audio_process = {k.lower() for k in args.audio_process}
Expand All @@ -91,8 +94,7 @@ def main(): # pylint: disable=too-many-branches, too-many-statements, too-many-
is_keep=args.keep,
cmds=args.audio_process_cmd,
output_name=args.output,
input_m=input_m,
ffmpeg_cmd=ffmpeg_cmd)
input_m=input_m)
if not prcs_file:
raise exceptions.AutosubException(
_("No works done."))
Expand All @@ -110,8 +112,7 @@ def main(): # pylint: disable=too-many-branches, too-many-statements, too-many-
is_keep=args.keep,
cmds=args.audio_process_cmd,
output_name=args.output,
input_m=input_m,
ffmpeg_cmd=ffmpeg_cmd)
input_m=input_m)
args.audio_split_cmd = \
args.audio_split_cmd.replace(
"-vn -ac [channel] -ar [sample_rate] ", "")
Expand Down Expand Up @@ -149,10 +150,10 @@ def main(): # pylint: disable=too-many-branches, too-many-statements, too-many-
elif validate_result == 1:
cmdline_utils.validate_sp_args(args)
fps = cmdline_utils.get_fps(args=args, input_m=input_m)
cmdline_utils.subs_trans(args,
input_m=input_m,
fps=fps,
styles_list=None)
cmdline_utils.sub_trans(args,
input_m=input_m,
fps=fps,
styles_list=None)

except KeyboardInterrupt:
print(_("\nKeyboardInterrupt. Works stopped."))
Expand Down
Loading

0 comments on commit db0850c

Please sign in to comment.