//
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// utterancesourcemulti.h -- implementation of utterancesource.h that supports multiple feature and label sets
//
#pragma once
#include "basetypes.h" // for attempt()
#include "htkfeatio.h" // for htkmlfreader
#include "latticearchive.h" // for reading HTK phoneme lattices (MMI training)
#include "minibatchsourcehelpers.h"
#include "minibatchiterator.h"
namespace msra { namespace dbn {
// ---------------------------------------------------------------------------
// minibatchutterancesource -- feature source to provide randomized utterances
// This also implements a frame-wise mode, which is layered on top of the utterance-wise mode
// and thus benefits from its goodies such as corpus-wide high-level randomization and chunk paging.
// ---------------------------------------------------------------------------
class minibatchutterancesourcemulti : public minibatchsource
{
void operator=(const minibatchutterancesourcemulti & other); // non-assignable
std::vector vdim; // feature dimension after augmenting neighhors
std::vector leftcontext; // number of frames to the left of the target frame in the context window
std::vector rightcontext; // number of frames to the right of the target frame in the context window
std::vector sampperiod; // (for reference and to check against model)
std::vector featkind;
std::vector featdim;
const bool framemode; // true -> actually return frame-level randomized frames (not possible in lattice mode)
std::vector> counts; // [s] occurence count for all states (used for priors)
int verbosity;
// lattice reader
//const std::vector> &lattices;
const latticesource & lattices;
//std::vector lattices;
// word-level transcripts (for MMI mode when adding best path to lattices)
const map & allwordtranscripts; // (used for getting word-level transcripts)
//std::vector