Usage: compute-mfcc-feats [options...] <wav-rspecifier> <feats-wspecifier> """ po = ParseOptions(usage) mfcc_opts = MfccOptions() mfcc_opts.register(po) po.register_bool( "subtract-mean", False, "Subtract mean of each feature" "file [CMS]; not recommended to do it this way.") po.register_float( "vtln-warp", 1.0, "Vtln warp factor (only applicable " "if vtln-map not specified)") po.register_str( "vtln-map", "", "Map from utterance or speaker-id to " "vtln warp factor (rspecifier)") po.register_str( "utt2spk", "", "Utterance to speaker-id map rspecifier" "(if doing VTLN and you have warps per speaker)") po.register_int( "channel", -1, "Channel to extract (-1 -> expect mono, " "0 -> left, 1 -> right)") po.register_float( "min-duration", 0.0, "Minimum duration of segments " "to process (in seconds).") opts = po.parse_args() if (po.num_args() != 2): po.print_usage()
usage = """Decode features using GMM-based model. Usage: gmm-decode-faster.py [options] model-in fst-in features-rspecifier words-wspecifier [alignments-wspecifier [lattice-wspecifier]] Note: lattices, if output, will just be linear sequences; use gmm-latgen-faster if you want "real" lattices. """ po = ParseOptions(usage) decoder_opts = FasterDecoderOptions() decoder_opts.register(po, True) po.register_float("acoustic-scale", 0.1, "Scaling factor for acoustic likelihoods") po.register_bool("allow-partial", True, "Produce output even when final state was not reached") po.register_str("word-symbol-table", "", "Symbol table for words [for debug output]"); opts = po.parse_args() if po.num_args() < 4 or po.num_args() > 6: po.print_usage() sys.exit() model_rxfilename = po.get_arg(1) fst_rxfilename = po.get_arg(2) feature_rspecifier = po.get_arg(3) words_wspecifier = po.get_arg(4) alignment_wspecifier = po.get_opt_arg(5) lattice_wspecifier = po.get_opt_arg(6) gmm_decode_faster(model_rxfilename, fst_rxfilename, feature_rspecifier, words_wspecifier,
) po.register_double( "learning-rate", 200.0, "The learning rate for t-sne is usually in the range [10.0, 1000.0]. If the" " learning rate is too high, the data may look like a \'ball\' with any point" " approximately equidistant from its nearest neighbors. If the learning rate" " is too low, most points may look compressed in a dense cloud with few outliers." " If the cost function gets stuck in a bad local minimum increasing the learning" " rate may help. (200.0 by default)") po.register_int( "n-iter", 1000, "Maximum number of iterations for the optimization. Should be at least 250. (1000 by default)" ) po.register_str( "distance", "euclidean", "The distance measurement between vectors. \n" "It could be [euclidean|cityblock|mahalanobis|cosine|...]. For more options, please refer to" " https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.pdist.html" " (euclidean by default)") opts = po.parse_args() if (po.num_args() != 2): po.print_usage() sys.exit() vector_rspecifier = po.get_arg(1) vector_wspecifier = po.get_arg(2) pdb.set_trace() isSuccess = tsne_vector(vector_rspecifier, vector_wspecifier, output_dim=opts.output_dim, perplexity=opts.perplexity,