forked from NVIDIA/fsi-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels_infer.py
executable file
·33 lines (27 loc) · 984 Bytes
/
models_infer.py
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
"""
////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) NVIDIA Corporation. All rights reserved.
//
// NVIDIA Sample Code
//
// Please refer to the NVIDIA end user license agreement (EULA) associated
// with this source code for terms and conditions that govern your use of
// this software. Any use, reproduction, disclosure, or distribution of
// this software and related documentation outside the terms of the EULA
// is strictly prohibited.
//
////////////////////////////////////////////////////////////////////////////
"""
from asr_infer import asr_text
from tts_infer import get_wave
from qa_infer import get_answer
class Model(object):
def __init__(self):
pass
def qa_infer(self, paragraph_text, question):
return get_answer(paragraph_text, question)
def asr_infer(self, wav_file):
return asr_text(wav_file)
def tacotron_infer(self, text):
return get_wave(text)