Speech recognition: Tips: 1.Open your terminal or command prompt type "pip install speechRecognition". 2.Check your internet connection. 3.Save a .wav extension recorded audio file name as "sound" in my document. 4.Then, type under below code. Code: import speech_recognition as sr AUDIO_FILE=('sound.wav') r=sr.Recognizer() with sr.AudioFile(AUDIO_FILE) as source: audio=r.record(source) try: print("audio file contain:\n"+r.recognize_google(audio)) except sr.UnknownValueError: print("Not recog") except sr.RequestError: print("Data not get") --------------------------------------------------------------------------------------------------------------------------- Thank you for visiting. Comment for response!
Sir if i enter
ReplyDeleteRam Chandra Das
Ok sir. Thank you.
DeleteIt will still show 'R.Das' in output because only the first letter of the first name and the last name is taken to make the attribute, middle name is ignored.
DeleteCan you do it
DeleteRam Chandra Das will print as R.C.Das
#include
Deletevoid main()
{
char fname[20], mname[20], lname[20];
printf("Enter full name (first middle last): ");
scanf("%s %s %s", fname, mname, lname);
printf("Abbreviated name: ");
printf("%c. %c. %s\n", fname[0], mname[0], lname);
return 0;
}