Sample tutorial for how you can test all of our video actors with your audio to see which output looks the best and fits your neeeds
import os
from dword.core import DeepWord
from dword.utils import play_audio
from pathlib import Path
acc = DeepWord(API_KEY, SECRET_KEY)
login successful
acc.available_credits
9976.5
acc.download_video_actors()
'Successfully downloaded all video actors'
!ls video_actors
Anna.mp4    Dalton.mp4  Isaac.mp4   Karen.mp4   Mia.mp4     Richard.mp4
Berto.mp4   Emily.mp4   James.mp4   Marcus.mp4  Micheal.mp4 Sam.mp4
Carlos.mp4  Henry.mp4   Julia.mp4   Mary.mp4    Noelle.mp4  Trey.mp4
path = Path('video_actors/')

actor_list = list(path.glob('*'))
actor_list[:5]
[Path('video_actors/Isaac.mp4'),
 Path('video_actors/Henry.mp4'),
 Path('video_actors/Sam.mp4'),
 Path('video_actors/Julia.mp4'),
 Path('video_actors/Mary.mp4')]
text = 'this is some audio I want to test with all video actors before deciding which actor to use'
acc._available_languages[:10]
['arabic_egypt',
 'arabic_saudi_arabia',
 'bulgarian',
 'catalan',
 'czech',
 'welsh',
 'danish',
 'german_austria',
 'german_switzerland',
 'german_germany']
lang = 'english_us'
speaker = acc._available_speakers(lang)[5]
audio = acc.text2speech(text, lang, speaker)
Successfully generated audio file text2speech.mp3
play_audio(audio)
for act in actor_list[:2]:
    title = f'{act.stem}_test.mp4'
    acc.generate_video(act, audio, title = title) # same audio with different actors