Change speaking to receive avatar from frontend.
This commit is contained in:
5
app.py
5
app.py
@@ -602,7 +602,8 @@ def save_speaking():
|
||||
def generate_speaking_video():
|
||||
try:
|
||||
data = request.get_json()
|
||||
sp1_result = create_video(data["question"], random.choice(list(AvatarEnum)))
|
||||
avatar = data.get("avatar", random.choice(list(AvatarEnum)).value)
|
||||
sp1_result = create_video(data["question"], avatar)
|
||||
if sp1_result is not None:
|
||||
sound_file_path = VIDEO_FILES_PATH + sp1_result
|
||||
firebase_file_path = FIREBASE_SPEAKING_VIDEO_FILES_PATH + sp1_result
|
||||
@@ -633,7 +634,7 @@ def generate_interactive_video():
|
||||
try:
|
||||
data = request.get_json()
|
||||
sp3_questions = []
|
||||
avatar = random.choice(list(AvatarEnum))
|
||||
avatar = data.get("avatar", random.choice(list(AvatarEnum)).value)
|
||||
|
||||
app.logger.info('Creating videos for speaking part 3')
|
||||
for question in data["questions"]:
|
||||
|
||||
Reference in New Issue
Block a user