  End-2-end (E2E) models have become increasingly popular in some ASR tasks
because of their performance and advantages. These E2E models directly
approximate the posterior distribution of tokens given the acoustic inputs.
Consequently, the E2E systems implicitly define a language model (LM) over the
output tokens, which makes the exploitation of independently trained language
models less straightforward than in conventional ASR systems. This makes it
difficult to dynamically adapt E2E ASR system to contextual profiles for better
recognizing special words such as named entities. In this work, we propose a
contextual density ratio approach for both training a contextual aware E2E
model and adapting the language model to named entities. We apply the
aforementioned technique to an E2E ASR system, which transcribes doctor and
patient conversations, for better adapting the E2E system to the names in the
conversations. Our proposed technique achieves a relative improvement of up to
46.5% on the names over an E2E baseline without degrading the overall
recognition accuracy of the whole test set. Moreover, it also surpasses a
contextual shallow fusion baseline by 22.1 % relative.
