Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -470,7 +470,7 @@ def run_edit_zh(seed, sub_amount, aug_text, cfg_coef, cfg_stride, prompt_length,
|
|
470 |
|
471 |
converter = opencc.OpenCC('t2s')
|
472 |
orig_transcript = converter.convert(orig_transcript)
|
473 |
-
transcribe_state = align_zh(traditional_to_simplified(segments), audio_path)
|
474 |
transcribe_state['segments'] = traditional_to_simplified(transcribe_state['segments'])
|
475 |
|
476 |
print(orig_transcript)
|
@@ -568,7 +568,7 @@ def run_tts_zh(seed, sub_amount, aug_text, cfg_coef, cfg_stride, prompt_length,
|
|
568 |
|
569 |
converter = opencc.OpenCC('t2s')
|
570 |
orig_transcript = converter.convert(orig_transcript)
|
571 |
-
transcribe_state = align_zh(traditional_to_simplified(segments), audio_path)
|
572 |
transcribe_state['segments'] = traditional_to_simplified(transcribe_state['segments'])
|
573 |
|
574 |
print(orig_transcript)
|
@@ -593,7 +593,7 @@ def run_tts_zh(seed, sub_amount, aug_text, cfg_coef, cfg_stride, prompt_length,
|
|
593 |
|
594 |
converter = opencc.OpenCC('t2s')
|
595 |
orig_transcript = converter.convert(orig_transcript)
|
596 |
-
transcribe_state = align_zh(traditional_to_simplified(segments), audio_path)
|
597 |
transcribe_state['segments'] = traditional_to_simplified(transcribe_state['segments'])
|
598 |
|
599 |
print(orig_transcript)
|
@@ -628,9 +628,9 @@ def run_tts_zh(seed, sub_amount, aug_text, cfg_coef, cfg_stride, prompt_length,
|
|
628 |
new_audio = new_audio[0].cpu()
|
629 |
torchaudio.save(audio_path, new_audio, codec_audio_sr)
|
630 |
|
631 |
-
[new_transcript, new_segments, _] = transcribe_zh(audio_path)
|
632 |
|
633 |
-
transcribe_state = align_zh(traditional_to_simplified(new_segments), audio_path)
|
634 |
transcribe_state['segments'] = traditional_to_simplified(transcribe_state['segments'])
|
635 |
tmp1 = transcribe_state['segments'][0]['words'][0]['word']
|
636 |
tmp2 = target_transcript_copy
|
|
|
470 |
|
471 |
converter = opencc.OpenCC('t2s')
|
472 |
orig_transcript = converter.convert(orig_transcript)
|
473 |
+
transcribe_state,_ = align_zh(traditional_to_simplified(segments), audio_path)
|
474 |
transcribe_state['segments'] = traditional_to_simplified(transcribe_state['segments'])
|
475 |
|
476 |
print(orig_transcript)
|
|
|
568 |
|
569 |
converter = opencc.OpenCC('t2s')
|
570 |
orig_transcript = converter.convert(orig_transcript)
|
571 |
+
transcribe_state,_ = align_zh(traditional_to_simplified(segments), audio_path)
|
572 |
transcribe_state['segments'] = traditional_to_simplified(transcribe_state['segments'])
|
573 |
|
574 |
print(orig_transcript)
|
|
|
593 |
|
594 |
converter = opencc.OpenCC('t2s')
|
595 |
orig_transcript = converter.convert(orig_transcript)
|
596 |
+
transcribe_state,_ = align_zh(traditional_to_simplified(segments), audio_path)
|
597 |
transcribe_state['segments'] = traditional_to_simplified(transcribe_state['segments'])
|
598 |
|
599 |
print(orig_transcript)
|
|
|
628 |
new_audio = new_audio[0].cpu()
|
629 |
torchaudio.save(audio_path, new_audio, codec_audio_sr)
|
630 |
|
631 |
+
[new_transcript, new_segments, _,_] = transcribe_zh(audio_path)
|
632 |
|
633 |
+
transcribe_state,_ = align_zh(traditional_to_simplified(new_segments), audio_path)
|
634 |
transcribe_state['segments'] = traditional_to_simplified(transcribe_state['segments'])
|
635 |
tmp1 = transcribe_state['segments'][0]['words'][0]['word']
|
636 |
tmp2 = target_transcript_copy
|