Skip to content

DUQIA/Short-Video-To-Video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Short-Video-To-Video

cloab huggingface Maxiduration(s) API
DEMO colab huggingface 60
Whisper colab huggingface 20
Process Short Video To Video Whisper
Video separation
Vocals separation
Vocals merge mono
Send Whisper
Speech to text
Text to speech
Vocals time verify
video merge

⚠️Attention

  • Currently, only one person’s voice is supported!
  • The currently referenced space is up to one hour. huggingface
  • If the original video is DTS, then the Vocals audio on the page can only be used as a reference!
  • Currently, only Google translator is supported. If you need other Translator, first select the Translator and submit. You will get Language has been reloaded, please select again! Then, select the Language. Click here for details.

⭕The two slowest steps in the current process:

  • Video being recognized as DTS.
  • Sending to Whisper.

🌐Use other translators:

  • In the translates variable of list_dict,find the corresponding Translator, and change None to the variate_name in the .py file you created.
  • And add from you_flie_name import variate_name at the top of list_dict.
  • Add the following code in colab and run it step by step.
  • !pip install translators install
  • import translators as ts import
  • Language_list = ts.translate_text('text', translator='translators', from_language='auto', to_language=None)Replace 'translators' with the key corresponding to the value you set in list_dict, this will result in a TranslatorError exception, which contains a complete list of this translator, copy it.
  • Replace the empty dict_values list in the following code.
  • ⚠️Note, most codes are supported in the url.If you can’t find the code in the second line of the printout, you can try ISO-639-2, or ask GPT or Copilot.🎉
import bs4
import requests

url = 'https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes#Table'
response = requests.get(url)
soup = bs4.BeautifulSoup(response.text, 'html.parser')

dict_values = []
dict_keys = []
for x in dict_values:
  id = soup.select(f'#{x}')
  if id:
    vl = id[0].get_text()
    dict_keys.append(vl)
  else:
    dict_keys.append('none')

dicts = dict(zip(dict_keys, dict_values))
print(dicts)
print(dicts['none'])