File size: 985 Bytes
f5abf67
 
 
 
 
 
22c3b30
f5abf67
 
 
 
 
e8c2599
f5abf67
 
 
22c3b30
 
 
f5abf67
 
 
 
 
 
 
 
 
 
 
 
f1f1b4c
f5abf67
 
 
 
 
 
 
 
 
 
 
 
fbbbcab
f5abf67
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/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

@spaces.GPU(duration=1)
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()