def generate_html(): a = Airium() a('<!DOCTYPE html>') with a.html(): with a.head(): a.title(_t="Speech Evaluation") a.meta(name="viewport", content="width=device-width, initial-scale=1.0") with a.body(): a.h5(_t="Hello, world!") return str(a)
def generate_html(): a = Airium() a('<!DOCTYPE html>') with a.html(): with a.head(): a.title(_t="TTS Demo Files") a.meta(name="viewport", content="width=device-width, initial-scale=1.0") a.link( href= "https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css", rel="stylesheet", integrity= "sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6", crossorigin="anonymous") with a.body(): with a.div(klass="container pb-5 pt-5"): a.h1(_t="Emotional TTS Demo Files", klass="text-center display-1 pt-5 pb-5") a.h5( _t="21/04/19 : Reproduced VAW-GAN based emotion converter", klass="pt-5 pb-3") a.h5( _t= "21/06/01-A: Added phoneme embeddings to the encoder of VAW-GAN", klass="pt-5 pb-3") a.h5( _t="21/06/01-B: Tested CMU-MOSEI with the vanilla VAW-GAN", klass="pt-5 pb-3") a.h5( _t= "21/06/22 : Tested VAW-GAN with forced alignment on word-level", klass="pt-5 pb-3") a.h5( _t= "21/07/06 : Tested VAW-GAN with forced alignment on word-level with MFCC Nonspeech Masking", klass="pt-5 pb-3") a.h5( _t= "21/08/24-A: Tested VAW-GAN with pyworld.harvest() in WORLD", klass="pt-5 pb-3") a.h5( _t= "21/08/24-B: Tested VAW-GAN with synthesised neutral speech as the training set", klass="pt-5 pb-3") for folder, files_by_file_name in get_file_list().items(): a.h3(_t= f"Samples from {convert_folder_name_to_date(folder)}", klass="text-center display-6 pt-5") for original_file_name, files_by_model in files_by_file_name.items( ): a.h4(_t=original_file_name, klass="pt-5 pb-5 text-success") for model, files in files_by_model.items(): if 'neu' == model: with a.div( klass="row row-cols-1 row-cols-md-2 g-4" ): with a.div(klass="col"): with a.div(klass="card"): with a.div( klass= "card-body text-center"): a.h5( _t= extract_emotion_from_file_name( files[0]), klass="card-title") a.audio(controls=True, src=os.path.join( 'samples', folder, files[0])) else: if len(files) > 0: a.h5(_t=f"Samples Generated with {model}", klass="pt-5 pb-3") with a.div( klass= "row row-cols-1 row-cols-md-2 g-4" ): for file in files: with a.div(klass="col"): with a.div(klass="card"): with a.div( klass= "card-body text-center" ): a.h5( _t= extract_emotion_from_file_name( file), klass="card-title") a.audio( controls=True, src=os.path.join( 'samples', folder, file)) a.script( src= "https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js", integrity= "sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf", crossorigin="anonymous") return str(a)