# Path: post_process/post_process.py
# N = P.shape[0]
#             D0 = np.sum(P[0:n0, 0]) + np.sum(P[(n0 + 1):n1, 1]) + np.sum(P[(n1 + 1):n2, 2]) + np.sum(
#                     P[(n2 + 1):N, 3])
#         D0 = np.sum(P[0:n0, 0]) + np.sum(P[(n0 + 1):n2, 2]) + np.sum(P[(n2 + 1):N, 3])


import argparse
import os
import shutil
import sys
from extract_features import extract_features
from label2textgrid import create_text_grid
from lib import utils
from post_process import post_process
from run_backend import run





def predict(input_path, output_path, start_extract, end_extract):
    tmp_dir = 'tmp_files/'
    tmp_features = 'tmp.features'
    tmp_prob = 'tmp.prob'
    tmp_prediction = 'tmp.prediction'
    if not os.path.exists(input_path):
        print >>sys.stderr, "wav file does not exits"

# Path: post_process/post_process.py
# N = P.shape[0]
#             D0 = np.sum(P[0:n0, 0]) + np.sum(P[(n0 + 1):n1, 1]) + np.sum(P[(n1 + 1):n2, 2]) + np.sum(
#                     P[(n2 + 1):N, 3])
#         D0 = np.sum(P[0:n0, 0]) + np.sum(P[(n0 + 1):n2, 2]) + np.sum(P[(n2 + 1):N, 3])


# Path: run_all/predict.py
import argparse
import os
import shutil
import sys
from extract_features import extract_features
from label2textgrid import create_text_grid
from lib import utils
from post_process import post_process
from run_backend import run






def predict(input_path, output_path, start_extract, end_extract):
    tmp_dir = 'tmp_files/'
    tmp_features = 'tmp.features'
    tmp_prob = 'tmp.prob'
    tmp_prediction = 'tmp.prediction'
    if not os.path.exists(input_path):
        print >>sys.stderr, "wav file does not exits"

        return