frascuchon commited on
Commit
20de2d7
·
1 Parent(s): 8d78fb6

remove extra arguments

Browse files
Files changed (1) hide show
  1. mcp_server.py +12 -31
mcp_server.py CHANGED
@@ -748,8 +748,6 @@ def align_songs_by_bpm_mcp(
748
  def create_medley_mcp(
749
  vocals_path: str,
750
  instrumental_path: str,
751
- vocals_gain: float = 0.6,
752
- instrumental_gain: float = 1.2,
753
  output_format: str = "wav",
754
  ) -> str:
755
  """
@@ -762,8 +760,6 @@ def create_medley_mcp(
762
 
763
  vocals_path: Path to the vocals audio file or URL (supports common formats: WAV, MP3, FLAC, M4A)
764
  instrumental_path: Path to the instrumental audio file or URL (supports common formats: WAV, MP3, FLAC, M4A)
765
- vocals_gain: Gain multiplier for vocals (default: 0.6, typical range: 0.5-1.0)
766
- instrumental_gain: Gain multiplier for instrumental (default: 1.2, typical range: 0.5-2.0)
767
  output_format: Output format for medley ('wav' or 'mp3', default: 'wav')
768
 
769
  Returns:
@@ -782,6 +778,9 @@ def create_medley_mcp(
782
  - Handles different track lengths by extending shorter with silence
783
  - Uses high-quality audio processing algorithms
784
  """
 
 
 
785
  try:
786
  result = create_medley(
787
  vocals_path=vocals_path,
@@ -1132,12 +1131,6 @@ def replace_section_mcp(
1132
  def replace_voice_mcp(
1133
  source_audio_path: str,
1134
  target_audio_path: str,
1135
- diffusion_steps: int = 10,
1136
- length_adjust: float = 1.0,
1137
- inference_cfg_rate: float = 0.7,
1138
- f0_condition: bool = False,
1139
- auto_f0_adjust: bool = True,
1140
- pitch_shift: int = 0,
1141
  ) -> str:
1142
  """
1143
  Replace voice in source audio with voice from target audio using Seed-VC.
@@ -1149,12 +1142,6 @@ def replace_voice_mcp(
1149
  Args:
1150
  source_audio_path: Path to the source audio file or URL (voice to be replaced)
1151
  target_audio_path: Path to the target audio file or URL (voice to use)
1152
- diffusion_steps: Number of diffusion steps for inference (default: 10)
1153
- length_adjust: Length adjustment factor (default: 1.0)
1154
- inference_cfg_rate: Classifier-free guidance rate (default: 0.7)
1155
- f0_condition: Whether to use F0 conditioning (default: False)
1156
- auto_f0_adjust: Whether to auto-adjust F0 (default: True)
1157
- pitch_shift: Pitch shift in semitones (default: 0)
1158
 
1159
  Returns:
1160
  Path to the generated voice-replaced audio file
@@ -1178,6 +1165,14 @@ def replace_voice_mcp(
1178
  - Applies voice characteristics from target audio
1179
  - Processing time depends on diffusion steps and audio length
1180
  """
 
 
 
 
 
 
 
 
1181
  return replace_voice_wrapper(
1182
  source_audio_path=source_audio_path,
1183
  target_audio_path=target_audio_path,
@@ -1452,12 +1447,6 @@ def create_interface() -> gr.TabbedInterface:
1452
  inputs=[
1453
  gr.Audio(type="filepath", label="Vocals Stem", sources=["upload"]),
1454
  gr.Audio(type="filepath", label="Instrumental Stem", sources=["upload"]),
1455
- gr.Number(
1456
- value=0.6, label="Vocals Gain", minimum=0.1, maximum=3.0, step=0.1
1457
- ),
1458
- gr.Number(
1459
- value=1.2 , label="Instrumental Gain", minimum=0.1, maximum=3.0, step=0.1
1460
- ),
1461
  gr.Dropdown(
1462
  choices=["wav", "mp3"],
1463
  value="wav",
@@ -1703,15 +1692,7 @@ def create_interface() -> gr.TabbedInterface:
1703
  type="filepath",
1704
  label="Target Audio (voice to use) - Local file or URL",
1705
  sources=["upload"],
1706
- ),
1707
- gr.Number(value=10, label="Diffusion Steps", minimum=1, maximum=50),
1708
- gr.Number(value=1.0, label="Length Adjust", minimum=0.1, maximum=3.0),
1709
- gr.Number(value=0.7, label="Inference CFG Rate", minimum=0.0, maximum=1.0),
1710
- gr.Checkbox(value=False, label="F0 Condition"),
1711
- gr.Checkbox(value=True, label="Auto F0 Adjust"),
1712
- gr.Number(
1713
- value=0, label="Pitch Shift (semitones)", minimum=-12, maximum=12
1714
- ),
1715
  ],
1716
  outputs=gr.Audio(label="Voice-Replaced Audio", type="filepath"),
1717
  title="Voice Replacement with Seed-VC",
 
748
  def create_medley_mcp(
749
  vocals_path: str,
750
  instrumental_path: str,
 
 
751
  output_format: str = "wav",
752
  ) -> str:
753
  """
 
760
 
761
  vocals_path: Path to the vocals audio file or URL (supports common formats: WAV, MP3, FLAC, M4A)
762
  instrumental_path: Path to the instrumental audio file or URL (supports common formats: WAV, MP3, FLAC, M4A)
 
 
763
  output_format: Output format for medley ('wav' or 'mp3', default: 'wav')
764
 
765
  Returns:
 
778
  - Handles different track lengths by extending shorter with silence
779
  - Uses high-quality audio processing algorithms
780
  """
781
+ vocals_gain: float = 0.6
782
+ instrumental_gain: float = 1.2
783
+
784
  try:
785
  result = create_medley(
786
  vocals_path=vocals_path,
 
1131
  def replace_voice_mcp(
1132
  source_audio_path: str,
1133
  target_audio_path: str,
 
 
 
 
 
 
1134
  ) -> str:
1135
  """
1136
  Replace voice in source audio with voice from target audio using Seed-VC.
 
1142
  Args:
1143
  source_audio_path: Path to the source audio file or URL (voice to be replaced)
1144
  target_audio_path: Path to the target audio file or URL (voice to use)
 
 
 
 
 
 
1145
 
1146
  Returns:
1147
  Path to the generated voice-replaced audio file
 
1165
  - Applies voice characteristics from target audio
1166
  - Processing time depends on diffusion steps and audio length
1167
  """
1168
+
1169
+ diffusion_steps: int = 35
1170
+ length_adjust: float = 1.0
1171
+ inference_cfg_rate: float = 0.5
1172
+ f0_condition: bool = False
1173
+ auto_f0_adjust: bool = False
1174
+ pitch_shift: int = 0
1175
+
1176
  return replace_voice_wrapper(
1177
  source_audio_path=source_audio_path,
1178
  target_audio_path=target_audio_path,
 
1447
  inputs=[
1448
  gr.Audio(type="filepath", label="Vocals Stem", sources=["upload"]),
1449
  gr.Audio(type="filepath", label="Instrumental Stem", sources=["upload"]),
 
 
 
 
 
 
1450
  gr.Dropdown(
1451
  choices=["wav", "mp3"],
1452
  value="wav",
 
1692
  type="filepath",
1693
  label="Target Audio (voice to use) - Local file or URL",
1694
  sources=["upload"],
1695
+ )
 
 
 
 
 
 
 
 
1696
  ],
1697
  outputs=gr.Audio(label="Voice-Replaced Audio", type="filepath"),
1698
  title="Voice Replacement with Seed-VC",