name: "kaldi_online"
backend: "kaldi"
max_batch_size: 600
model_transaction_policy {
  decoupled: True
}
parameters [
  {
    key: "config_filename"
    value { 
      string_value: "/data/models/LibriSpeech/conf/online.conf"
    }
  },
  {
    key: "nnet3_rxfilename"
    value { 
      string_value: "/data/models/LibriSpeech/final.mdl"
    }
  },
  {
    key: "fst_rxfilename"
    value { 
      string_value: "/data/models/LibriSpeech/HCLG.fst"
    }
  },
  {
    key: "word_syms_rxfilename"
    value { 
      string_value: "/data/models/LibriSpeech/words.txt"
    }
  },
  {
    key: "lattice_postprocessor_rxfilename"
    value { 
      string_value: ""
    }
  },
  {
    key: "use_tensor_cores"
    value {
      string_value: "1"
    }
  },
  {
    key: "main_q_capacity"
    value {
      string_value: "30000"
    }
  },
  {
    key: "aux_q_capacity"
    value {
      string_value: "400000"
    }
  },
  {
    key: "beam"
    value { 
      string_value: "10"
    }
  },
  {
    key: "num_worker_threads"
    value { 
      string_value: "40"
    } 
  },
  {
    key: "num_channels"
    value { 
      string_value: "4000"
    }
  },
  {
    key: "lattice_beam"
    value { 
      string_value: "7" 
    }
  },
  {
    key: "max_active"
    value { 
      string_value: "10000" 
    }
  },
  {
    key: "frame_subsampling_factor"
    value { 
      string_value: "3" 
    }
  },
  {
    key: "acoustic_scale"
    value { 
      string_value: "1.0" 
    }
  }
]
sequence_batching {
  max_sequence_idle_microseconds: 5000000
  control_input [
    {
      name: "START"
      control [
        {
          kind: CONTROL_SEQUENCE_START
          int32_false_true: [ 0, 1 ]
        }
      ]
    },
    {
      name: "READY"
      control [
        {
          kind: CONTROL_SEQUENCE_READY
          int32_false_true: [ 0, 1 ]
        }
      ]
    },
    {
      name: "END"
      control [
        {
          kind: CONTROL_SEQUENCE_END
          int32_false_true: [ 0, 1 ]
        }
      ]
    },
    {
      name: "CORRID"
      control [
        {
          kind: CONTROL_SEQUENCE_CORRID
          data_type: TYPE_UINT64
        }
      ]
    }
  ]
  oldest {
    max_candidate_sequences: 4000
    preferred_batch_size: [ 600 ]
    max_queue_delay_microseconds: 1000
  }
},

input [
  {
    name: "WAV_DATA"
    data_type: TYPE_FP32
    dims: [ 8160 ]
  },
  {
    name: "WAV_DATA_DIM"
    data_type: TYPE_INT32
    dims: [ 1 ]
  }
]
output [
  {
    name: "RAW_LATTICE"
    data_type: TYPE_STRING
    dims: [ 1 ]
  },
  {
    name: "TEXT"
    data_type: TYPE_STRING
    dims: [ 1 ]
  },
  {
    name: "CTM"
    data_type: TYPE_STRING
    dims: [ 1 ]
  }

]
instance_group [
  {
    count: 1
    kind: KIND_GPU
  }
]
