MV.AudioMsg
1.0.0
dotnet add package MV.AudioMsg --version 1.0.0
NuGet\Install-Package MV.AudioMsg -Version 1.0.0
<PackageReference Include="MV.AudioMsg" Version="1.0.0" />
<PackageVersion Include="MV.AudioMsg" Version="1.0.0" />
<PackageReference Include="MV.AudioMsg" />
paket add MV.AudioMsg --version 1.0.0
#r "nuget: MV.AudioMsg, 1.0.0"
#:package MV.AudioMsg@1.0.0
#addin nuget:?package=MV.AudioMsg&version=1.0.0
#tool nuget:?package=MV.AudioMsg&version=1.0.0
MV.AudioMsg 🎙️
A MV.AudioMsg é uma biblioteca (DLL) desenvolvida em .NET para facilitar a implementação de síntese de voz (Text-to-Speech) em aplicações Windows. Com uma interface simples e eventos nativos, ela permite converter textos em áudio utilizando as vozes instaladas no sistema operacional.
🚀 Funcionalidades Listagem automática de vozes instaladas no Windows.
Controle de velocidade (Rate) e volume.
Execução assíncrona para não travar a interface do usuário.
Eventos integrados: início, progresso e conclusão da fala.
🖼️ Demonstração Abaixo, um exemplo da interface simples criada para demonstrar o consumo da DLL:
🛠️ Como usar Para utilizar a biblioteca em seu projeto, instale MV.AudioMsg pelo nuget e utilize o namespace MV.AudioMsg.ServiceContract.
Exemplo de Implementação Aqui está um exemplo prático de como configurar um formulário WinForms para utilizar a biblioteca:
using MV.AudioMsg;
using MV.AudioMsg.ServiceContract;
using System.Speech.Synthesis;
public partial class Form1 : Form
{
private InstalledVoice _selectedVoice;
private readonly ISpeechService _iSpeechService;
public Form1()
{
InitializeComponent();
// Inicializa o serviço de voz
_iSpeechService = new SpeechService();
ConfigureSpeechEvents();
}
private void Form1_Load(object sender, EventArgs e)
{
LoadVoices();
if (comboBoxVoz.Items.Count > 0)
comboBoxVoz.SelectedIndex = 0;
}
private void ConfigureSpeechEvents()
{
_iSpeechService.SpeakProgress += OnSpeakProgress;
_iSpeechService.SpeakStarted += OnSpeakStarted;
_iSpeechService.SpeakCompleted += OnSpeakCompleted;
}
private void LoadVoices()
{
var voices = _iSpeechService.GetInstalledVoices();
comboBoxVoz.Items.Clear();
foreach (var item in voices)
{
comboBoxVoz.Items.Add(item.VoiceInfo.Name);
}
}
private void GenerateSpeech()
{
string text = txtTexto.Text;
if (string.IsNullOrEmpty(text) || _selectedVoice == null)
{
MessageBox.Show("Digite um texto e selecione uma voz!", "Aviso!");
return;
}
_iSpeechService.CancelAll(); // Cancela falas anteriores
_iSpeechService.SetVoice(_selectedVoice.VoiceInfo.Name);
_iSpeechService.SetRate(6); // Define a velocidade
_iSpeechService.SetVolume(100);
_iSpeechService.SpeakAsync(text);
}
private void comboBoxVoz_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBoxVoz.SelectedItem != null)
{
string voiceName = comboBoxVoz.SelectedItem.ToString();
var voices = _iSpeechService.GetInstalledVoices();
_selectedVoice = voices.FirstOrDefault(v => v.VoiceInfo.Name == voiceName);
}
}
private void btnGerar_Click(object sender, EventArgs e)
{
GenerateSpeech();
}
// Handlers para eventos de voz (atualize a UI se necessário)
private void OnSpeakProgress(object sender, SpeakProgressEventArgs e) { /* Lógica aqui */ }
private void OnSpeakStarted(object sender, SpeakStartedEventArgs e) { /* Lógica aqui */ }
private void OnSpeakCompleted(object sender, SpeakCompletedEventArgs e) { /* Lógica aqui */ }
}
📦 Instalação Clone o repositório:
Bash git clone https://github.com/xX-Mill3r-Xx/MV.Audio.git Busque por MV.AudioMsg no nuget e adicione como referência no seu projeto .NET.
Certifique-se de que o sistema possui vozes instaladas (Configurações do Windows > Hora e Idioma > Fala).
Desenvolvido por xX-Mill3r-Xx
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.CognitiveServices.Speech (>= 1.48.1)
- System.Speech (>= 10.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 143 | 2/17/2026 |