Wednesday 4 September 2013

Text-To-Speech .NET

This post is to introduce you with SAPI that allows a user to make an automated system that will send the input given by user to speakers and then Speakers will speak or output that text

* SAPI Stands for Speech Application Programming Interface . It is an API developed by Microsoft
to allow users to develop speech recognition systems. 

* The first version of SAPI was released in 1995. This is a program that offers Text-To-Speech and speech Recognition Capabilities. 

* SAPI interfaces are provided for C,C++,C# and visual Basic Languages. 

* SAPI is most widely used application program interface ( API ) used today

CODE For Text - To - Speech in  VB.NET 


Dim SAPI
SAPI = CreateObject ( "sapi.spvoice" ) 
SAPI.speak( TextBox2.Text )

In order to Use SAPI we have to create object of SAPI . In Code Above in line 2 we have created object assigned it SAPI . SAPI is a simple variable nothing more than that there is no need to be confused about that . Then we have used speak ( )  method to give or direct the input to speakers to speak or output all given input.


DEMO APPLICATION FOR SAPI

DEMO APPLICATION 1


DOWNLOAD DEMO APPLICATION FROM LINK BELOW


CODE  FOR DEMO APPLICATION :- 


Public Class Form1

    Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress

        Dim i As Integer
        i = 0
        Dim ch As Char
        ch = e.KeyChar

        If ch = " " Then
            Dim SAPI
            SAPI = CreateObject("sapi.spvoice")
            SAPI.speak(TextBox2.Text)
            TextBox2.Text = ""

        Else
TextBox2.text = TextBox2.text + ch;
        End If

    End Sub

Explanation Of Code

In this code I have taken a variable i of type integer and initialized it to Zero . I have taken a  char type variable that will take character typed or cached by keypress event. 

First in If ( ) codition  i have checked whether the entered character is a blank space or not .If entered character is not a blank space then this code just add the entered character to the TextBox and If user has pressed a space then the complete word will be spoken by SAPI object .

This code spoke the words not only characters entered by user it first takes the characters and then collect them and after completion of word it passes it to SAPI object and SAPI will give that word as output to speaker to spoke it

DEMO APPLICATION 2


DOWNLOAD DEMO APPLICATION 2 FROM LINK BELOW




DEMO APPLICATION 3


DOWNLOAD DEMO APPLICATION 3 FROM LINK BELOW
https://docs.google.com/file/d/0ByR2IblIaEGyOGpuT0NiaTZIZHM/edit



Sunday 1 September 2013

Make calculator in .net

There are number of calculators available . If you want to make a Basic calculator in .NET Then you can surf a number of Calculators code on the Internet . But If you have used the calculators come in Microsoft-Windows PC's Then you can notice these are best , easy to operate and can accept no of operators one time as these are advanced calculators . So make a calculator similar to these calculators come in Microsoft-Windows PC's is logical way of developing a calculator. I have tried a simple calculator That only does Addition , Substration, Division and Multiplication of integers and Fractional numbers .

Saturday 24 August 2013

Explain HeapSort With Example

Heap Sort is a Sorting Mechanism Developed by J. W. J. Williams 

We have looked at various Sorting Algorithms but the faster sorting algorithms  in the average and best case time and Algorithm that did not require any space over and above what was needed to store the input is a Heap Sort Algorithm

Friday 23 August 2013

Thursday 22 August 2013

Wednesday 21 August 2013

Tuesday 20 August 2013

Data Types in C++


C++ Supports a variety of Data types and programmer can select the appropriate type as per the need of application. Data Type is generally tells or specifies the type of data that we are going to store in the variable or Type of value a function will return when called at RunTime.

Monday 19 August 2013

Sunday 11 August 2013

Sunday 7 July 2013