monkeyplug-enhanced 2.2.2__tar.gz → 2.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: monkeyplug-enhanced
3
- Version: 2.2.2
3
+ Version: 2.2.3
4
4
  Summary: Enhanced fork of monkeyplug — censors profanity in audio files using speech recognition with Groq API, AI instrumental generation, and batch processing.
5
5
  Project-URL: Homepage, https://github.com/ljbred08/monkeyplug
6
6
  Project-URL: Issues, https://github.com/ljbred08/monkeyplug/issues
@@ -19,6 +19,7 @@ Requires-Dist: numpy>=1.24.0
19
19
  Requires-Dist: requests==2.32.5
20
20
  Requires-Dist: sherpa-onnx>=1.10.0
21
21
  Requires-Dist: soundfile>=0.12.0
22
+ Requires-Dist: tqdm>=4.65.0
22
23
  Description-Content-Type: text/markdown
23
24
 
24
25
  # monkeyplug-enhanced
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "monkeyplug-enhanced"
7
- version = "2.2.2"
7
+ version = "2.2.3"
8
8
  authors = [
9
9
  { name="Seth Grover", email="mero.mero.guero@gmail.com" },
10
10
  { name="Lincoln Brown", email="link@brown.fm" },
@@ -26,6 +26,7 @@ dependencies = [
26
26
  "sherpa-onnx>=1.10.0",
27
27
  "numpy>=1.24.0",
28
28
  "soundfile>=0.12.0",
29
+ "tqdm>=4.65.0",
29
30
  ]
30
31
 
31
32
  [project.urls]
@@ -17,6 +17,7 @@ import shutil
17
17
  import string
18
18
  import sys
19
19
  import wave
20
+ from tqdm import tqdm
20
21
 
21
22
  from urllib.parse import urlparse
22
23
  from itertools import tee
@@ -683,7 +684,17 @@ class Plugger(object):
683
684
  # Extract, separate, and get instrumental file
684
685
  if self.instrumentalSegments:
685
686
  try:
687
+ # Update progress bar to show extraction starting
688
+ if hasattr(self, '_progress') and self._progress and not self.debug:
689
+ self._progress.update(1)
690
+ self._progress.total = 3
691
+ self._progress.set_description("Extracting instrumental")
692
+
686
693
  self.instrumentalFileSpec = self._create_combined_profanity_file()
694
+
695
+ # Update progress after extraction completes
696
+ if hasattr(self, '_progress') and self._progress and not self.debug:
697
+ self._progress.update(1)
687
698
  if self.instrumentalFileSpec:
688
699
  self.instrumentalMode = True
689
700
  self._build_instrumental_filters()
@@ -899,8 +910,55 @@ class Plugger(object):
899
910
  ######## EncodeCleanAudio ####################################################
900
911
  def EncodeCleanAudio(self):
901
912
  if (self.forceDespiteTag is True) or (GetMonkeyplugTagged(self.inputFileSpec, debug=self.debug) is False):
913
+ # Initialize progress (only when not in debug mode)
914
+ progress = None
915
+ if not self.debug:
916
+ # Determine first action
917
+ if not self.inputTranscript:
918
+ initial_desc = "Transcribing"
919
+ else:
920
+ initial_desc = "Processing"
921
+
922
+ progress = tqdm(
923
+ total=1, # Will be updated based on actual steps
924
+ desc=initial_desc,
925
+ unit="step",
926
+ disable=False,
927
+ bar_format='{l_bar}{bar}| {n_fmt}/{total_fmt} [{elapsed}<{remaining}]',
928
+ )
929
+
930
+ # Store progress reference for use in CreateCleanMuteList
931
+ self._progress = progress
932
+
902
933
  self.CreateCleanMuteList()
903
934
 
935
+ # Update progress after CreateCleanMuteList
936
+ if progress:
937
+ did_extraction = (
938
+ hasattr(self, 'autoGenerateMode') and
939
+ self.autoGenerateMode and
940
+ hasattr(self, 'segMapping') and
941
+ self.segMapping
942
+ )
943
+
944
+ if not self.inputTranscript and not did_extraction:
945
+ # Transcription done inside CreateCleanMuteList, no extraction
946
+ progress.update(1)
947
+ progress.total = 2
948
+ progress.set_description("Encoding")
949
+ elif not self.inputTranscript and did_extraction:
950
+ # Both transcription and extraction handled inside CreateCleanMuteList
951
+ # Just set description to encoding
952
+ progress.set_description("Encoding")
953
+ elif self.inputTranscript and did_extraction:
954
+ # Extraction handled inside CreateCleanMuteList (no transcription update needed)
955
+ progress.total = 2
956
+ progress.set_description("Encoding")
957
+ else:
958
+ # No transcription, no extraction - just encoding
959
+ progress.total = 1
960
+ progress.set_description("Encoding")
961
+
904
962
  # Handle instrumental mode differently
905
963
  if self.instrumentalMode:
906
964
  # Use instrumental splicing
@@ -981,8 +1039,19 @@ class Plugger(object):
981
1039
 
982
1040
  SetMonkeyplugTag(self.outputFileSpec, debug=self.debug)
983
1041
 
1042
+ # Complete progress
1043
+ if progress:
1044
+ progress.update(1)
1045
+ progress.close()
1046
+
984
1047
  else:
985
1048
  shutil.copyfile(self.inputFileSpec, self.outputFileSpec)
1049
+ if progress:
1050
+ progress.close()
1051
+
1052
+ # Clean up progress reference
1053
+ if hasattr(self, '_progress'):
1054
+ delattr(self, '_progress')
986
1055
 
987
1056
  return self.outputFileSpec
988
1057