Spaces:
Running
on
Zero
Running
on
Zero
| #!/usr/bin/env python3 | |
| """ | |
| Moss Speech Demo - Multimodal Speech Interaction System | |
| Main Program Entry | |
| """ | |
| import spaces | |
| import argparse | |
| import os | |
| import sys | |
| sys.path.append(os.path.dirname(os.path.abspath(__file__))) | |
| sys.path.append("/home/user/app/Matcha-TTS") | |
| from utils.interface import MIMOInterface | |
| def keep_spaces_happy(): | |
| pass | |
| def parse_args(): | |
| parser = argparse.ArgumentParser(description="Moss Speech Demo") | |
| parser.add_argument( | |
| "--model_path", | |
| type=str, | |
| default="fnlp/MOSS-Speech", | |
| help="the path of model", | |
| ) | |
| parser.add_argument( | |
| '--codec_path', | |
| type=str, | |
| default='fnlp/MOSS-Speech-Codec', | |
| help="the path of codec", | |
| ) | |
| return parser.parse_args() | |
| def main(): | |
| args = parse_args() | |
| # create demo | |
| interface = MIMOInterface(args.model_path) | |
| demo = interface.create_interface() | |
| demo.launch() | |
| if __name__ == "__main__": | |
| main() | |