System.Speech.Synthesis Namespace
Contém classes para inicializar e configurar um mecanismo de síntese de fala, criar prompts, gerar fala, responder a eventos e modificar as características de voz. Contains classes for initializing and configuring a speech synthesis engine, for creating prompts, for generating speech, for responding to events, and for modifying voice characteristics.
Classes
| BookmarkReachedEventArgs |
Retorna os dados do evento BookmarkReached.Returns data from the BookmarkReached event. |
| FilePrompt |
Representa um prompt criado com base em um arquivo.Represents a prompt created from a file. |
| InstalledVoice |
Contém informações sobre uma voz de síntese de fala instalada no Windows.Contains information about a speech synthesis voice installed in Windows. |
| PhonemeReachedEventArgs |
Retorna os dados do evento PhonemeReached.Returns data from the PhonemeReached event. |
| Prompt |
Representa informações sobre o que pode ser renderizado, texto ou um arquivo de áudio, pelo SpeechSynthesizer.Represents information about what can be rendered, either text or an audio file, by the SpeechSynthesizer. |
| PromptBuilder |
Cria um objeto Prompt vazio e fornece métodos para adicionar conteúdo, selecionar vozes, controlar atributos de voz e a pronúncia de palavras faladas.Creates an empty Prompt object and provides methods for adding content, selecting voices, controlling voice attributes, and controlling the pronunciation of spoken words. |
| PromptEventArgs |
Representa a classe base para classes |
| PromptStyle |
Define um estilo para falar prompts que consistem em configurações de ênfase, taxa e volume.Defines a style for speaking prompts that consists of settings for emphasis, rate, and volume. |
| SpeakCompletedEventArgs |
Retorna a notificação do evento SpeakCompleted.Returns notification from the SpeakCompleted event. |
| SpeakProgressEventArgs |
Retorna os dados do evento SpeakProgress.Returns data from the SpeakProgress event. |
| SpeakStartedEventArgs |
Retorna a notificação do evento SpeakStarted.Returns notification from the SpeakStarted event. |
| SpeechSynthesizer |
Fornece acesso à funcionalidade de um mecanismo de síntese de fala instalado.Provides access to the functionality of an installed speech synthesis engine. |
| StateChangedEventArgs |
Retorna os dados do evento StateChanged.Returns data from the StateChanged event. |
| VisemeReachedEventArgs |
Retorna os dados do evento VisemeReached.Returns data from the VisemeReached event. |
| VoiceChangeEventArgs |
Retorna os dados do evento VoiceChange.Returns data from the VoiceChange event. |
| VoiceInfo |
Representa um mecanismo de sintetização de voz instalado.Represents an installed speech synthesis engine. |
Enumerações
| PromptBreak |
Enumera os valores para os intervalos de separação prosódica (quebras) entre os limites das palavras.Enumerates values for intervals of prosodic separation (breaks) between word boundaries. |
| PromptEmphasis |
Enumera os valores para níveis de ênfase nos prompts.Enumerates values for levels of emphasis in prompts. |
| PromptRate |
Enumera os valores para a taxa de fala de avisos.Enumerates values for the speaking rate of prompts. |
| PromptVolume |
Enumera os valores para níveis de volume (intensidade) nos prompts.Enumerates values for volume levels (loudness) in prompts. |
| SayAs |
Enumera os tipos de conteúdo para a fala de elementos como horas, datas e moeda.Enumerates the content types for the speaking of elements such as times, dates, and currency. |
| SynthesisMediaType |
Enumera os tipos de arquivos de mídia.Enumerates the types of media files. |
| SynthesisTextFormat |
Enumera os tipos de formatos de texto que podem ser usados para construir um objeto Prompt.Enumerates the types of text formats that may be used to construct a Prompt object. |
| SynthesizerEmphasis |
Enumera os níveis de ênfase do sintetizador.Enumerates levels of synthesizer emphasis. |
| SynthesizerState |
Enumera os valores do estado do SpeechSynthesizer.Enumerates values for the state of the SpeechSynthesizer. |
| VoiceAge |
Define os valores para a idade de uma voz sintetizada.Defines the values for the age of a synthesized voice. |
| VoiceGender |
Define os valores para o sexo de uma voz sintetizada.Defines the values for the gender of a synthesized voice. |
Comentários
Inicializar e configurarInitialize and Configure
A SpeechSynthesizer classe fornece acesso à funcionalidade de um mecanismo de síntese de fala instalado no computador host.The SpeechSynthesizer class provides access to the functionality of a speech synthesis engine that is installed on the host computer. Os mecanismos de síntese de fala instalados são representados por uma voz, por exemplo, Microsoft Anna.Installed speech synthesis engines are represented by a voice, for example Microsoft Anna. Uma SpeechSynthesizer instância Inicializa para a voz padrão.A SpeechSynthesizer instance initializes to the default voice. Para configurar uma SpeechSynthesizer instância do para usar uma das outras vozes instaladas, chame SelectVoice os SelectVoiceByHints métodos ou.To configure a SpeechSynthesizer instance to use one of the other installed voices, call the SelectVoice or SelectVoiceByHints methods. Para obter informações sobre quais vozes estão instaladas, use o GetInstalledVoices método.To get information about which voices are installed, use the GetInstalledVoices method.
Você pode rotear a saída do SpeechSynthesizer para um fluxo, um arquivo, o dispositivo de áudio padrão ou para um dispositivo nulo usando um dos métodos na SpeechSynthesizer classe cujo nome começa com " SetOutputTo ".You can route the output of the SpeechSynthesizer to a stream, a file, the default audio device, or to a null device by using one of the methods in the SpeechSynthesizer class whose name begins with "SetOutputTo".
Criar promptsCreate Prompts
Use um dos métodos da PromptBuilder classe cujo nome começa com " Append " para criar conteúdo para prompts de texto, linguagem de marcação de síntese de fala (SSML), arquivos que contêm texto ou marcação SSML ou arquivos de áudio pré-gravados.Use one the methods of the PromptBuilder class whose name begins with "Append" to build content for prompts from text, Speech Synthesis Markup Language (SSML), files containing text or SSML markup, or prerecorded audio files.
Consulte construindo um prompt complexo no Guia de programação de fala do sistema para .NET Framework para obter mais informações e exemplos.See Constructing a Complex Prompt in the System Speech Programming Guide for .NET Framework for more information and examples.
Gerar falaGenerate Speech
Para gerar a fala de uma cadeia de caracteres ou de um Prompt PromptBuilder objeto ou, use os Speak SpeakAsync métodos ou.To generate speech from a string or from a Prompt or PromptBuilder object, use the Speak or the SpeakAsync methods. Para gerar a fala da marcação SSML, use os SpeakSsml SpeakSsmlAsync métodos ou.To generate speech from SSML markup, use the SpeakSsml or the SpeakSsmlAsync methods. Consulte referência de linguagem de marcação de síntese de fala para obter um guia para marcação SSML.See Speech Synthesis Markup Language Reference for a guide to SSML markup.
Você pode orientar a pronúncia de palavras usando os AppendTextWithHint métodos ou AppendTextWithPronunciation e adicionando ou removendo léxicos para uma SpeechSynthesizer instância usando os AddLexicon RemoveLexicon métodos e.You can guide the pronunciation of words by using the AppendTextWithHint or AppendTextWithPronunciation methods, and by adding or removing lexicons for a SpeechSynthesizer instance using the AddLexicon and RemoveLexicon methods.
Responder a eventosRespond to Events
A SpeechSynthesizer classe inclui eventos que informam a um aplicativo de fala que o SpeechSynthesizer encontrou um recurso específico em um prompt, conforme relatado pelas SpeakProgressEventArgs BookmarkReachedEventArgs classes,, PhonemeReachedEventArgs e VisemeReachedEventArgs .The SpeechSynthesizer class includes events that inform a speech application that the SpeechSynthesizer encountered a specific feature in a prompt, as reported by the SpeakProgressEventArgs, BookmarkReachedEventArgs, PhonemeReachedEventArgs, and VisemeReachedEventArgs classes.
Para obter informações sobre o início e o fim da fala de um prompt pelo SpeechSynthesizer , use as SpeakStartedEventArgs classes e SpeakCompletedEventArgs .To get information about the beginning and end of the speaking of a prompt by the SpeechSynthesizer, use the SpeakStartedEventArgs and SpeakCompletedEventArgs classes.
Consulte usando eventos de síntese de fala no Guia de programação de fala do sistema para .NET Framework para obter mais informações e exemplos.See Using Speech Synthesis Events in the System Speech Programming Guide for .NET Framework for more information and examples.
Modificar características de vozModify Voice Characteristics
A PromptStyle classe e StartStyle os AppendText métodos permitem modificar características de uma SpeechSynthesizer voz usando Emphasis parâmetros, Rate e Volume .The PromptStyle class and StartStyle and AppendText methods let you modify characteristics of a SpeechSynthesizer voice using Emphasis, Rate, and Volume parameters. Para modificar as características de uma voz, como cultura, idade e gênero, use um dos StartVoice métodos da PromptBuilder classe ou os SelectVoiceByHints métodos da SpeechSynthesizer classe.To modify characteristics of a voice such as culture, age, and gender, use one of the StartVoice methods of the PromptBuilder class or the SelectVoiceByHints methods of the SpeechSynthesizer class.
Consulte controlando os atributos de voz no Guia de programação de fala do sistema para .NET Framework para obter mais informações.See Controlling Voice Attributes in the System Speech Programming Guide for .NET Framework for more information.