# US 2025/0166611 A1 · Language determination method and electronic device

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

- Number: US 2025/0166611 A1
- Document ID: US20250166611A1
- Status: Published application
- Kind: A1
- Application number: 18/927,620
- Filed: 2024-10-25
- Published: 2025-05-22
- Earliest claimed: 2023-11-17
- Applicants: Beijing Zitiao Network Technology Co., Ltd.
- Inventors: Bing YANG; Hongxu XU; Lei HUANG
- Web page: https://patentgrep.com/patent/US20250166611A1

## CPC

- G10L 13/086: {Detection of language}
- G10L 15/26: Speech to text systems (G10L15/08 takes precedence)
- G06F 40/263: Language identification
- G06F 40/58: Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
- G10L 15/063: {Training}
- G10L: SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present disclosure provides a language determination method and electronic device. The method includes: obtaining a first text and a reply text for the first text; determining a target sentence in the reply text; determining a first language of the first text and a second language of a preceding part of the target sentence; and determining a target language used when the target sentence is converted into speech based on the target sentence, the reply text, the first language, and the second language.

## Claims

### Claim 1

A language determination method, comprising:
obtaining a first text and a reply text for the first text;
determining a target sentence in the reply text;
determining a first language of the first text and a second language of a preceding part of the target sentence; and
determining a target language used when the target sentence is converted into speech based on the target sentence, the reply text, the first language, and the second language.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the determining a target language used when the target sentence is converted into speech based on the target sentence, the reply text, the first language, and the second language comprises:
recognizing a text in the target sentence to determine a sentence type of the target sentence, the sentence type comprising at least one of the following: a non-standard word type, a formula type, a numeric type, and a standard word type; and
determining, based on the sentence type, the reply text, the first language, and the second language, the target language used when the target sentence is converted into speech.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the determining, based on the sentence type, the reply text, the first language, and the second language, the target language used when the target sentence is converted into speech comprises:
obtaining a number of characters in the reply text; and
determining, based on the number of characters, the sentence type, the first language, and the second language, the target language used when the target sentence is converted into speech.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the determining, based on the number of characters, the sentence type, the first language, and the second language, the target language used when the target sentence is converted into speech comprises:
determining, in response to the number of characters being less than or equal to a preset threshold, whether the sentence type is the non-standard word type, to obtain a determination result, and determining the target language based on the determination result; or
determining, in response to the number of characters being greater than a preset threshold, the target language based on the sentence type and the second language.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the determining the target language based on the determination result comprises:
determining, in response to the determination result being that the sentence type is the non-standard word type, that a target language of a non-standard word in the target sentence is the first language; or
determining, in response to the determination result being that the sentence type is the standard word type, a language associated with the text in the target sentence as a target language used when the text is converted into speech.

### Claim 6 (depends on 4)

The method according to claim 4, wherein the determining the target language based on the sentence type and the second language comprises:
determining, in response to the sentence type being the formula type, that the target language of the target sentence is the second language;
determining, in response to the sentence type being the numeric type, that a number in the target sentence is in the second language and that a target language of the other text in the target sentence is a language associated with the other text; or
determining, in response to the sentence type being the standard word type, the language associated with the text in the target sentence as the target language used when the text is converted into speech.

### Claim 7 (depends on 1)

The method according to any one of claim 1, wherein the obtaining a reply text for the first text comprises:
obtaining speech in response to a touch operation on a speech acquisition control;
performing speech recognition on the speech to obtain the first text corresponding to the speech; and
inputting the first text into a language model to obtain the reply text for the first text.

### Claim 8 (depends on 1)

The method according to any one of claim 1, wherein after the determining a target language used when the target sentence is converted into speech, the method further comprises:
performing text to speech processing on the target sentence based on the target language used when the target sentence is converted into speech, to obtain target speech.

### Claim 9

An electronic device, comprising:
a processor; and
a memory, configured to store computer-executable instructions,
wherein the computer-executable instructions stored in the memory, when executed by the processor, cause the processor to:
obtain a first text and a reply text for the first text;
determine a target sentence in the reply text;
determine a first language of the first text and a second language of a preceding part of the target sentence; and
determine a target language used when the target sentence is converted into speech based on the target sentence, the reply text, the first language, and the second language.

### Claim 10 (depends on 9)

The electronic device according to claim 9, wherein the processor is further caused to:
recognize a text in the target sentence to determine a sentence type of the target sentence, the sentence type comprising at least one of the following: a non-standard word type, a formula type, a numeric type, and a standard word type; and
determine, based on the sentence type, the reply text, the first language, and the second language, the target language used when the target sentence is converted into speech.

### Claim 11 (depends on 10)

The electronic device according to claim 10, wherein the processor is further caused to:
obtain a number of characters in the reply text; and
determine, based on the number of characters, the sentence type, the first language, and the second language, the target language used when the target sentence is converted into speech.

### Claim 12 (depends on 11)

The electronic device according to claim 11, wherein the processor is further caused to:
determine, in response to the number of characters being less than or equal to a preset threshold, whether the sentence type is the non-standard word type, to obtain a determination result, and determining the target language based on the determination result; or
determine, in response to the number of characters being greater than a preset threshold, the target language based on the sentence type and the second language.

### Claim 13 (depends on 12)

The electronic device according to claim 12, wherein the processor is further caused to:
determine, in response to the determination result being that the sentence type is the non-standard word type, that a target language of a non-standard word in the target sentence is the first language; or
determine, in response to the determination result being that the sentence type is the standard word type, a language associated with the text in the target sentence as a target language used when the text is converted into speech.

### Claim 14 (depends on 12)

The electronic device according to claim 12, wherein the processor is further caused to:
determine, in response to the sentence type being the formula type, that the target language of the target sentence is the second language;
determine, in response to the sentence type being the numeric type, that a number in the target sentence is in the second language and that a target language of the other text in the target sentence is a language associated with the other text; or
determine, in response to the sentence type being the standard word type, the language associated with the text in the target sentence as the target language used when the text is converted into speech.

### Claim 15 (depends on 9)

The electronic device according to claim 9, wherein the processor is further caused to:
obtain speech in response to a touch operation on a speech acquisition control;
perform speech recognition on the speech to obtain the first text corresponding to the speech; and
input the first text into a language model to obtain the reply text for the first text.

### Claim 16 (depends on 9)

The electronic device according to claim 9, wherein after determine a target language used when the target sentence is converted into speech, the processor is further caused to:
perform text to speech processing on the target sentence based on the target language used when the target sentence is converted into speech, to obtain target speech.

### Claim 17

A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, cause the processor to:
obtain a first text and a reply text for the first text;
determine a target sentence in the reply text;
determine a first language of the first text and a second language of a preceding part of the target sentence; and
determine a target language used when the target sentence is converted into speech based on the target sentence, the reply text, the first language, and the second language.

### Claim 18 (depends on 17)

The computer-readable storage medium according to claim 17, wherein the processor is further caused to:
recognize a text in the target sentence to determine a sentence type of the target sentence, the sentence type comprising at least one of the following: a non-standard word type, a formula type, a numeric type, and a standard word type; and
determine, based on the sentence type, the reply text, the first language, and the second language, the target language used when the target sentence is converted into speech.

### Claim 19 (depends on 18)

The computer-readable storage medium according to claim 18, wherein the processor is further caused to:
obtain a number of characters in the reply text; and
determine, based on the number of characters, the sentence type, the first language, and the second language, the target language used when the target sentence is converted into speech.

### Claim 20 (depends on 19)

The computer-readable storage medium according to claim 19, wherein the processor is further caused to:
determine, in response to the number of characters being less than or equal to a preset threshold, whether the sentence type is the non-standard word type, to obtain a determination result, and determining the target language based on the determination result; or
determine, in response to the number of characters being greater than a preset threshold, the target language based on the sentence type and the second language.
