- Определение языка для распознавателя речи Specify the speech recognizer language
- Определение языка, используемого по умолчанию Identify the default language
- Подтверждение установленного языка Confirm an installed language
- Определение языка Specify a language
- Комментарии Remarks
- Связанные статьи Related articles
- How to set up and use Windows 10 Speech Recognition
- How to configure Speech Recognition on Windows 10
- How to train Speech Recognition to improve accuracy
- How to change Speech Recognition settings
- How to use Speech Recognition on Windows 10
- Starting Speech Recognition
- Turning on and off
- Using commands
- Using dictation
- Wrapping things up
- More Windows 10 resources
- The Dell XPS 15 is our choice for best 15-inch laptop
- Halo: MCC’s live service elements make it better, not worse
- Microsoft’s Surface Duo is not ‘failing up’
- These are the best PC sticks when you’re on the move
Определение языка для распознавателя речи Specify the speech recognizer language
Узнайте, как выбрать установленный язык для распознавания речи. Learn how to select an installed language to use for speech recognition.
Здесь мы перечисляем языки, установленные в системе, определяем язык, используемый по умолчанию, и выбираем другой язык для распознавания. Here, we enumerate the languages installed on a system, identify which is the default language, and select a different language for recognition.
Предварительные условия. Prerequisites:
В данной статье используются материалы статьи Распознавание речи. This topic builds on Speech recognition.
От вас требуется понимание основных принципов распознавания речи и знание соответствующих ограничений. You should have a basic understanding of speech recognition and recognition constraints.
Если вы еще не знакомы с разработкой приложений для Windows, ознакомьтесь с этими разделами, чтобы ознакомиться с технологиями, обсуждаемыми здесь. If you’re new to developing Windows apps, have a look through these topics to get familiar with the technologies discussed here.
Рекомендации по работе с пользователем: User experience guidelines:
Полезные советы по разработке практичного и привлекательного приложения с поддержкой голосовых функций см. в разделе Рекомендации по проектированию голосовых функций. For helpful tips about designing a useful and engaging speech-enabled app, see Speech design guidelines .
Определение языка, используемого по умолчанию Identify the default language
В качестве языка по умолчанию распознаватель речи использует язык для голосовых функций, установленный в системе. A speech recognizer uses the system speech language as its default recognition language. Этот язык устанавливает пользователь на устройстве, в разделе «Параметры» > «Система» > «Речь» > «Язык голосовых функций». This language is set by the user on the device Settings > System > Speech > Speech Language screen.
Чтобы определить язык по умолчанию, нужно проверить статическое свойство SystemSpeechLanguage. We identify the default language by checking the SystemSpeechLanguage static property.
Подтверждение установленного языка Confirm an installed language
На разных устройствах установленные языки могут отличаться. Installed languages can vary between devices. Следует проверить наличие языка, если с ним связано какое-либо ограничение, которое имеет для вас значение. You should verify the existence of a language if you depend on it for a particular constraint.
Примечание. После установки нового языкового пакета требуется перезагрузка. Note A reboot is required after a new language pack is installed. Исключение с кодом ошибки СПЕРР _ не _ найдено (0x8004503a) возникает, если указанный язык не поддерживается или не завершил установку. An exception with error code SPERR_NOT_FOUND (0x8004503a) is raised if the specified language is not supported or has not finished installing.
Определите поддерживаемые языки на устройстве, проверив одно из двух статических свойств класса SpeechRecognizer: Determine the supported languages on a device by checking one of two static properties of the SpeechRecognizer class:
SupportedTopicLanguages — коллекция объектов Language, используемых с предустановленными правилами грамматики для диктовки и поиска в Интернете. SupportedTopicLanguages—The collection of Language objects used with predefined dictation and web search grammars.
SupportedGrammarLanguages — коллекция объектов Language, используемых с ограничением по списку или файлом определения грамматики для распознавания речи (SRGS). SupportedGrammarLanguages—The collection of Language objects used with a list constraint or a Speech Recognition Grammar Specification (SRGS) file.
Определение языка Specify a language
Чтобы определить язык, передайте объект Language в конструктор SpeechRecognizer. To specify a language, pass a Language object in the SpeechRecognizer constructor.
Здесь мы определяем en-US как язык для распознавания. Here, we specify «en-US» as the recognition language.
Комментарии Remarks
Ограничение по одной теме можно настроить, добавив SpeechRecognitionTopicConstraint в коллекцию Constraints средства SpeechRecognizer, а затем вызвав CompileConstraintsAsync. A topic constraint can be configured by adding a SpeechRecognitionTopicConstraint to the Constraints collection of the SpeechRecognizer and then calling CompileConstraintsAsync. Если распознаватель не удалось инициализировать с поддерживаемым языком темы, возвращается состояние SpeechRecognitionResultStatus для TopicLanguageNotSupported . A SpeechRecognitionResultStatus of TopicLanguageNotSupported is returned if the recognizer is not initialized with a supported topic language.
Ограничение по списку можно настроить, добавив SpeechRecognitionListConstraint в коллекцию Constraints средства SpeechRecognizer, а затем вызвав CompileConstraintsAsync. A list constraint is configured by adding a SpeechRecognitionListConstraint to the Constraints collection of the SpeechRecognizer and then calling CompileConstraintsAsync. Вы не можете задать язык пользовательского списка напрямую. You cannot specify the language of a custom list directly. Список будет обрабатываться с использованием языка распознавателя. Instead, the list will be processed using the language of the recognizer.
Грамматика SRGS – это открытый формат XML, представляемый классом SpeechRecognitionGrammarFileConstraint. An SRGS grammar is an open-standard XML format represented by the SpeechRecognitionGrammarFileConstraint class. В отличие от пользовательских списков язык грамматики можно указать в разметке SRGS. Unlike custom lists, you can specify the language of the grammar in the SRGS markup. Выполнение CompileConstraintsAsync завершается ошибкой с состоянием SpeechRecognitionResultStatus для TopicLanguageNotSupported , если распознаватель не удалось инициализировать на языке разметки SRGS. CompileConstraintsAsync fails with a SpeechRecognitionResultStatus of TopicLanguageNotSupported if the recognizer is not initialized to the same language as the SRGS markup.
Связанные статьи Related articles
Примеры Samples
How to set up and use Windows 10 Speech Recognition
On Windows 10, Speech Recognition is an easy-to-use experience that allows you to control your computer entirely with voice commands.
Anyone can set up and use this feature to navigate, launch applications, dictate text, and perform a slew of other tasks. However, Speech Recognition was primarily designed to help people with disabilities who can’t use a mouse or keyboard.
In this Windows 10 guide, we walk you through the steps to configure and start using Speech Recognition to control your computer only with voice.
How to configure Speech Recognition on Windows 10
To set up Speech Recognition on your device, use these steps:
- Open Control Panel.
- Click on Ease of Access.
Click on Speech Recognition.
Click the Start Speech Recognition link.
Select the type of microphone you’ll be using.
Note: Desktop microphones are not ideal, and Microsoft recommends headset microphones or microphone arrays.
Click Next again.
Read the text aloud to ensure the feature can hear you.
Speech Recognition can access your documents and emails to improve its accuracy based on the words you use. Select the Enable document review option, or select Disable document review if you have privacy concerns.
Pick an activation mode:
- Use manual activation mode — Speech Recognition turns off the «Stop Listening» command. To turn it back on, you’ll need to click the microphone button or use the Ctrl + Windows key shortcut.
- Use voice activation mode — Speech Recognition goes into sleep mode when not in use, and you’ll need to invoke the «Start Listening» voice command to turn it back on.
If you’re not familiar with the commands, click the View Reference Sheet button to learn more about the voice commands you can use.
Select whether you want this feature to start automatically at startup.
Click the Start tutorial button to access the Microsoft video tutorial about this feature, or click the Skip tutorial button to complete the setup.
Once you complete these steps, you can start using the feature with voice commands, and the controls will appear at the top of the screen.
Quick Tip: You can drag and dock the Speech Recognition interface anywhere on the screen.
How to train Speech Recognition to improve accuracy
After the initial setup, we recommend training Speech Recognition to improve its accuracy and to prevent the «What was that?» message as much as possible.
- Open Control Panel.
- Click on Ease of Access.
Click on Speech Recognition.
Click the Train your computer to better understand you link.
Click Next to continue with the training as directed by the application.
After completing the training, Speech Recognition should have a better understanding of your voice to provide an improved experience.
How to change Speech Recognition settings
If you need to change the Speech Recognition settings, use these steps:
- Open Control Panel.
- Click on Ease of Access.
Click on Speech Recognition.
Click the Advanced speech options link in the left pane.
Inside «Speech Properties,» in the Speech Recognition tab, you can customize various aspects of the experience, including:
- Language.
- Recognition profiles.
- User settings.
- Microphone.
In the Text to Speech tab, you can control voice settings, including:
Additionally, you can always right-click the experience interface to open a context menu to access all the different features and settings you can use with Speech Recognition.
How to use Speech Recognition on Windows 10
While there is a small learning curve, Speech Recognition uses clear and easy-to-remember commands. For example, using the «Start» command opens the Start menu, while saying «Show Desktop» will minimize everything on the screen.
If Speech Recognition is having difficulties understanding your voice, you can always use the Show numbers command as everything on the screen has a number. Then say the number and speak OK to execute the command.
Here are some common tasks that will get you started with Speech Recognition:
Starting Speech Recognition
To launch the experience, just open the Start menu, search for Windows Speech Recognition, and select the top result.
Turning on and off
To start using the feature, click the microphone button or say Start listening depending on your configuration.
In the same way, you can turn it off by saying Stop listening or clicking the microphone button.
Using commands
Some of the most frequent commands you’ll use include:
- Open — Launches an app when saying «Open» followed by the name of the app. For example, «Open Mail,» or «Open Firefox.»
- Switch to — Jumps to another running app when saying «Switch to» followed by the name of the app. For example, «Switch to Microsoft Edge.»
- Control window in focus — You can use the commands «Minimize,» «Maximize,» and «Restore» to control an active window.
- Scroll — Allows you to scroll in a page. Simply use the command «Scroll down» or «Scroll up,» «Scroll left» or «Scroll right.» It’s also possible to specify long scrolls. For example, you can try: «Scroll down two pages.»
- Close app — Terminates an application by saying «Close» followed by the name of the running application. For example, «Close Word.»
- Clicks — Inside an application, you can use the «Click» command followed by the name of the element to perform a click. For example, in Word, you can say «Click Layout,» and Speech Recognition will open the Layout tab. In the same way, you can use «Double-click» or «Right-click» commands to perform those actions.
- Press — This command lets you execute shortcuts. For example, you can say «Press Windows A» to open Action Center.
Using dictation
Speech Recognition also includes the ability to convert voice into text using the dictation functionality, and it works automatically.
If you need to dictate text, open the application (making sure the feature is in listening mode) and start dictating. However, remember that you’ll have to say each punctuation mark and special character.
For example, if you want to insert the «Good morning, where do you like to go today?» sentence, you’ll need to speak, «Open quote good morning comma where do you like to go today question mark close quote.»
In the case that you need to correct some text that wasn’t recognized accurately, use the «Correct» command followed by the text you want to change. For example, if you meant to write «suite» and the feature recognized it as «suit,» you can say «Correct suit,» select the suggestion using the correction panel or say «Spell it» to speak the correct text, and then say «OK».
Wrapping things up
Although Speech Recognition doesn’t offer a conversational experience like a personal assistant, it’s still a powerful tool for anyone who needs to control their device entirely using only voice.
Cortana also provides the ability to control a device with voice, but it’s limited to a specific set of input commands, and it’s not possible to control everything that appears on the screen.
However, that doesn’t mean that you can’t get the best of both worlds. Speech Recognition runs independently of Cortana, which means that you can use the Microsoft’s digital assistant for certain tasks and Speech Recognition to navigate and execute other commands.
It’s worth noting that this speech recognition isn’t available in every language. Supported languages include English (U.S. and UK), French, German, Japanese, Mandarin (Chinese Simplified and Chinese Traditional), and Spanish.
While this guide is focused on Windows 10, Speech Recognition has been around for a long time, so you can refer to it even if you’re using Windows 8.1 or Windows 7.
More Windows 10 resources
For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:
The Dell XPS 15 is our choice for best 15-inch laptop
For a lot of people, a 15-inch laptop is a perfect size that offers enough screen for multitasking, and in a lot of cases, some extra performance from powerful hardware. We’ve rounded up the best of the best at this size.
Halo: MCC’s live service elements make it better, not worse
Halo: The Master Chief Collection is more popular than ever, but some fans don’t agree with the live service approach 343 Industries has taken with it. Here’s why those elements are, at the end of the day, great for the game and for Halo overall.
Microsoft’s Surface Duo is not ‘failing up’
Microsoft announced this week that it was expanding Surface Duo availability to nine new commercial markets. While Surface Duo is undoubtedly a work in progress, this is not a sign of a disaster. It’s also doesn’t mean that Surface Duo is selling a ton either. Instead, the reason for the expansion is a lot more straightforward.
These are the best PC sticks when you’re on the move
Instant computer — just add a screen. That’s the general idea behind the ultra-portable PC, but it can be hard to know which one you want. Relax, we have you covered!