private void Parar_Click(object sender, EventArgs e) { mciSendString("save meuaudio arquivo.wav", null, 0, IntPtr.Zero); mciSendString("close meuaudio", null, 0, IntPtr.Zero); IamAuthenticator authenticator = new IamAuthenticator( apikey: "0glqYYg5lpaDz2LNStEFtvowIdC0ditJf-3QnGsO5rfr"); SpeechToTextService service = new SpeechToTextService(authenticator); service.SetServiceUrl("https://stream.watsonplatform.net/speech-to-text/api"); var result = service.Recognize( audio: File.ReadAllBytes("arquivo.wav"), contentType: "audio/wav", model: "pt-BR_NarrowbandModel"); string voz = result.Result.Results.First().Alternatives.First().Transcript; if (voz.Contains("mensagem")) { Telas.FrmWhatsApp wpp = new FrmWhatsApp(); wpp.Show(); this.Hide(); } if (voz.Contains("fornecedor")) { Telas.FrmFornedor wpp = new FrmFornedor(); wpp.Show(); this.Hide(); } if (voz.Contains("estoque")) { telas.Estoque wpp = new telas.Estoque(); wpp.Show(); this.Hide(); } if (voz.Contains("financeiro")) { Telas.FrmFinanceiro wpp = new FrmFinanceiro(); wpp.Show(); this.Hide(); } }
private void btnDespGastos_Click(object sender, EventArgs e) { Telas.FrmFinanceiro fine = new FrmFinanceiro(); fine.Show(); this.Hide(); }
private void btnProduto_Click(object sender, EventArgs e) { Telas.FrmFinanceiro finan = new FrmFinanceiro(); finan.Show(); this.Hide(); }