copyWith method

ParakeetTdtDecodeState copyWith({
  1. int? lastTokenId,
  2. int? emittedSymbols,
  3. int? frameIndex,
  4. bool clearLastToken = false,
})

Implementation

ParakeetTdtDecodeState copyWith({
  int? lastTokenId,
  int? emittedSymbols,
  int? frameIndex,
  bool clearLastToken = false,
}) {
  return ParakeetTdtDecodeState(
    lastTokenId: clearLastToken ? null : (lastTokenId ?? this.lastTokenId),
    emittedSymbols: emittedSymbols ?? this.emittedSymbols,
    frameIndex: frameIndex ?? this.frameIndex,
  );
}