# US 2025/0095637 A1 · Multilingual and code-switching asr using large language model generated text

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0095637 A1
- Document ID: US20250095637A1
- Status: Published application
- Kind: A1
- Application number: 18/886,581
- Filed: 2024-09-16
- Published: 2025-03-20
- Earliest claimed: 2023-09-20
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Ke Hu; Tara N. Sainath; Bo Li; Yu Zhang; Yong Cheng; Tao Wang; Yujing Zhang; Frederick Liu
- Web page: https://patentgrep.com/patent/US20250095637A1

## CPC

- G10L 15/063: {Training}
- G06N 3/045: Combinations of networks
- G10L 15/005: {Language recognition}
- G10L 15/16: using artificial neural networks
- G10L 15/183: using context dependencies, e.g. language models
- G10L: SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method includes receiving a textual prompt in a first language and obtaining a fine-tuned prompt embedding configured to guide a large language model (LLM) to generate text in a target language from textual prompts in the first language. The method also includes processing, using the LLM, the textual prompt conditioned on the fine-tuned prompt embedding to generate output text in the target language and concatenating the textual prompt and the generated output text to provide an unspoken textual utterance. The method also includes training a multilingual automatic speech recognition (ASR) model to learn how to recognize speech in the target language by injecting the unspoken textual utterance into a text encoder associated with the multilingual ASR model.

## Claims

### Claim 1

A computer-implemented method executed on data processing hardware that causes the data processing hardware to perform operations comprising:
receiving a textual prompt in a first language;
obtaining a fine-tuned prompt embedding configured to guide a large language model (LLM) to generate text in a target language from textual prompts in the first language;
processing, using the LLM, the textual prompt conditioned on the fine-tuned prompt embedding to generate output text in the target language;
concatenating the textual prompt and the generated output text to provide an unspoken textual utterance; and
training a multilingual automatic speech recognition (ASR) model to learn how to recognize speech in the target language by injecting the unspoken textual utterance into a text encoder associated with the multilingual ASR model.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the output text generated in the target language comprises monolingual text in the first language.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, wherein the textual prompt comprises a prefix of a seed sentence in the first language, the seed sentence sampled from a set of multilingual seed sentences, the set of multilingual seed sentences comprising a plurality of monolingual seed sentence subsets, each monolingual seed sentence subset comprising corresponding seed sentences in a respective language different than the respective language of the corresponding seed sentences of each other monolingual seed sentence subset.

### Claim 4 (depends on 2)

The computer-implemented method of claim 2, wherein the fine-tuned prompt embedding is learned during a fine-tuning process by:
obtaining a randomly initialized trainable prompt embedding;
obtaining a multilingual training dataset comprising a plurality of training data subsets, each training data subset including corresponding monolingual training text utterances in a respective language that is different than the respective language of the corresponding monolingual training text utterances included in each other training data subset;
for each monolingual training text utterance:
tokenizing the monolingual training utterance into a sequence of corresponding sub-word units; and
processing, using the LLM, the sequence of corresponding sub-word units to determine a training loss that maximizes a probability of predicting a next sub-word unit based on each of the preceding sub-word units in the sequence of sub-word units; and
fine-tuning, using the training losses, the randomly initialized trainable prompt embedding while parameters of the LLM are kept fixed.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, wherein:
each corresponding training data subset of the plurality of training data subsets comprises one or more corresponding transcribed speech utterances each represented by a corresponding sequence of acoustic frames and paired with a corresponding transcription represented by a corresponding one of the monolingual training text utterances in the corresponding training data subset; and
training the multilingual speech recognition model further comprises training the multilingual speech recognition model on each of the one or more corresponding transcribed speech utterances in each corresponding training data subset of the plurality of training data subsets.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein the output text generated in the target language comprises text in a second language different than the first language.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, wherein the textual prompt comprises a prefix of a seed sentence in the first language, the seed sentence sampled from a set of code-mixed seed sentences, each code-mixed seed sentence comprising corresponding code-mixed text in both the first language and the second language.

### Claim 8 (depends on 6)

The computer-implemented method of claim 6, wherein the fine-tuned prompt embedding is learned during a fine-tuning process by:
obtaining a randomly initialized trainable prompt embedding;
obtaining a code-mixed training dataset comprising a plurality of code-mixed training text utterances that each comprise code-mixed text in the first language and the second language;
for each code-mixed training text utterance:
tokenizing the code-mixed training text utterance into a sequence of corresponding sub-word units; and
processing, using the LLM, the sequence of corresponding sub-word units to determine a training loss that maximizes a probability of predicting a next sub-word unit based on each of the preceding sub-word units in the sequence of sub-word units; and
fine-tuning, using the training losses, the randomly initialized trainable prompt embedding while parameters of the LLM are kept fixed.

### Claim 9 (depends on 8)

The computer-implemented method of claim 8, wherein:
the code-mixed training dataset comprises one or more corresponding transcribed code-mixed speech utterances each represented by a corresponding sequence of acoustic frames and paired with a corresponding transcription represented by a corresponding one of the code-mixed training text utterances; and
training the multilingual speech recognition model further comprises training the multilingual speech recognition model on each of the one or more corresponding transcribed code-mixed speech utterances in the code-mixed training dataset.

### Claim 10 (depends on 1)

The computer-implemented method of claim 1, wherein the LLM is pre-trained on a diverse range of text data sourced from web documents, books, and code.

### Claim 11 (depends on 1)

The computer-implemented method of claim 1, wherein training the multilingual ASR model to learn how to recognize speech in the target language by injecting the unspoken textual utterance into the text encoder associated with the multilingual ASR model comprises:
tokenizing the unspoken textual utterance into a sequence of sub-word units;
generating, by the text encoder of an encoder, at each of a plurality of output steps, a first higher order textual feature representation for a corresponding sub-word unit in the sequence of sub-word units tokenized from the unspoken textual utterance;
receiving, as input to a first-pass decoder, the first higher order textual feature representation generated by the text encoder at each of the plurality of output steps; and
generating, by the first-pass decoder, at each of the plurality of output steps, a first probability distribution over possible text units; and
training the encoder based on the first probability distribution over possible text units generated by the first-pass decoder at each of the plurality of output steps for the unspoken textual utterance.

### Claim 12 (depends on 11)

The computer-implemented method of claim 11, wherein the operations further comprise:
receiving, as input to a non-causal audio-text encoder of the encoder, the first higher order textual feature representation generated by the text encoder at each of the plurality of output steps;
generating, by the non-causal audio-text encoder, at each of the plurality of output steps, a second higher order textual feature representation for a corresponding first higher order textual feature representation;
receiving, as input to a second-pass decoder, the second higher order textual feature representation generated by the non-causal audio-text encoder at each of the plurality of output steps; and
generating, by the second decoder, at each of the plurality of output steps, a second probability distribution over possible text units,
wherein training the encoder is further based on the second probability distribution over possible text units generated by the second-pass decoder at each of the plurality of output steps for the unspoken textual utterance.

### Claim 13 (depends on 12)

The computer-implemented method of claim 12, wherein the first-pass decoder and the second-pass decoder comprise a same decoder.

### Claim 14 (depends on 12)

The computer-implemented method of claim 12, wherein the non-causal audio-text encoder comprises one of:
a plurality of unidirectional long short-term memory (LSTM) layers;
a plurality of conformer layers; or
a plurality of transformer layers.

### Claim 15

A system comprising:
data processing hardware; and
memory hardware in communication with the data processing hardware, the memory hardware storing instructions that when executed on the data processing hardware cause the data processing hardware to perform operations comprising:
receiving a textual prompt in a first language;
obtaining a fine-tuned prompt embedding configured to guide a large language model (LLM) to generate text in a target language from textual prompts in the first language;
processing, using the LLM, the textual prompt conditioned on the fine-tuned prompt embedding to generate output text in the target language;
concatenating the textual prompt and the generated output text to provide an unspoken textual utterance; and
training a multilingual automatic speech recognition (ASR) model to learn how to recognize speech in the target language by injecting the unspoken textual utterance into a text encoder associated with the multilingual ASR model.

### Claim 16 (depends on 15)

The system of claim 15, wherein the output text generated in the target language comprises monolingual text in the first language.

### Claim 17 (depends on 16)

The system of claim 16, wherein the textual prompt comprises a prefix of a seed sentence in the first language, the seed sentence sampled from a set of multilingual seed sentences, the set of multilingual seed sentences comprising a plurality of monolingual seed sentence subsets, each monolingual seed sentence subset comprising corresponding seed sentences in a respective language different than the respective language of the corresponding seed sentences of each other monolingual seed sentence subset.

### Claim 18 (depends on 16)

The system of claim 16, wherein the fine-tuned prompt embedding is learned during a fine-tuning process by:
obtaining a randomly initialized trainable prompt embedding;
obtaining a multilingual training dataset comprising a plurality of training data subsets, each training data subset including corresponding monolingual training text utterances in a respective language that is different than the respective language of the corresponding monolingual training text utterances included in each other training data subset;
for each monolingual training text utterance:
tokenizing the monolingual training utterance into a sequence of corresponding sub-word units; and
processing, using the LLM, the sequence of corresponding sub-word units to determine a training loss that maximizes a probability of predicting a next sub-word unit based on each of the preceding sub-word units in the sequence of sub-word units; and
fine-tuning, using the training losses, the randomly initialized trainable prompt embedding while parameters of the LLM are kept fixed.

### Claim 19 (depends on 18)

The system of claim 18, wherein:
each corresponding training data subset of the plurality of training data subsets comprises one or more corresponding transcribed speech utterances each represented by a corresponding sequence of acoustic frames and paired with a corresponding transcription represented by a corresponding one of the monolingual training text utterances in the corresponding training data subset; and
training the multilingual speech recognition model further comprises training the multilingual speech recognition model on each of the one or more corresponding transcribed speech utterances in each corresponding training data subset of the plurality of training data subsets.

### Claim 20 (depends on 15)

The system of claim 15, wherein the output text generated in the target language comprises text in a second language different than the first language.

### Claim 21 (depends on 20)

The system of claim 20, wherein the textual prompt comprises a prefix of a seed sentence in the first language, the seed sentence sampled from a set of code-mixed seed sentences, each code-mixed seed sentence comprising corresponding code-mixed text in both the first language and the second language.

### Claim 22 (depends on 20)

The system of claim 20, wherein the fine-tuned prompt embedding is learned during a fine-tuning process by:
obtaining a randomly initialized trainable prompt embedding;
obtaining a code-mixed training dataset comprising a plurality of code-mixed training text utterances that each comprise code-mixed text in the first language and the second language;
for each code-mixed training text utterance:
tokenizing the code-mixed training text utterance into a sequence of corresponding sub-word units; and
processing, using the LLM, the sequence of corresponding sub-word units to determine a training loss that maximizes a probability of predicting a next sub-word unit based on each of the preceding sub-word units in the sequence of sub-word units; and
fine-tuning, using the training losses, the randomly initialized trainable prompt embedding while parameters of the LLM are kept fixed.

### Claim 23 (depends on 22)

The system of claim 22, wherein:
the code-mixed training dataset comprises one or more corresponding transcribed code-mixed speech utterances each represented by a corresponding sequence of acoustic frames and paired with a corresponding transcription represented by a corresponding one of the code-mixed training text utterances; and
training the multilingual speech recognition model further comprises training the multilingual speech recognition model on each of the one or more corresponding transcribed code-mixed speech utterances in the code-mixed training dataset.

### Claim 24 (depends on 15)

The system of claim 15, wherein the LLM is pre-trained on a diverse range of text data sourced from web documents, books, and code.

### Claim 25 (depends on 15)

The system of claim 15, wherein training the multilingual ASR model to learn how to recognize speech in the target language by injecting the unspoken textual utterance into the text encoder associated with the multilingual ASR model comprises:
tokenizing the unspoken textual utterance into a sequence of sub-word units;
generating, by the text encoder of an encoder, at each of a plurality of output steps, a first higher order textual feature representation for a corresponding sub-word unit in the sequence of sub-word units tokenized from the unspoken textual utterance;
receiving, as input to a first-pass decoder, the first higher order textual feature representation generated by the text encoder at each of the plurality of output steps; and
generating, by the first-pass decoder, at each of the plurality of output steps, a first probability distribution over possible text units; and
training the encoder based on the first probability distribution over possible text units generated by the first-pass decoder at each of the plurality of output steps for the unspoken textual utterance.

### Claim 26 (depends on 25)

The system of claim 25, wherein the operations further comprise:
receiving, as input to a non-causal audio-text encoder of the encoder, the first higher order textual feature representation generated by the text encoder at each of the plurality of output steps;
generating, by the non-causal audio-text encoder, at each of the plurality of output steps, a second higher order textual feature representation for a corresponding first higher order textual feature representation;
receiving, as input to a second-pass decoder, the second higher order textual feature representation generated by the non-causal audio-text encoder at each of the plurality of output steps; and
generating, by the second decoder, at each of the plurality of output steps, a second probability distribution over possible text units,
wherein training the encoder is further based on the second probability distribution over possible text units generated by the second-pass decoder at each of the plurality of output steps for the unspoken textual utterance.

### Claim 27 (depends on 26)

The system of claim 26, wherein the first-pass decoder and the second-pass decoder comprise a same decoder.

### Claim 28 (depends on 26)

The system of claim 26, wherein the non-causal audio-text encoder comprises one of:
a plurality of unidirectional long short-term memory (LSTM) layers;
a plurality of conformer layers; or
a plurality of transformer layers.
