Popular posts from this blog
Speech Recognition | Python Program
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!
C program of Cyclic Redundancy Check
C program of Cyclic Redundancy Check Program #include <stdio.h> // shorthand for loops #define forn(i,e) for(int i = 0; i < e; i++) #define forsn(i,s,e) for(int i = s; i < e; i++) int validate_data( int len_data, int data[], int len_divisor, int divisor[]){ // Returns 1, if the data is correct // Returns 0, if the data is incorrect/corrupted. int current_bits[len_divisor]; forn(i, len_divisor) { current_bits[i] = data[i]; } // the logic is same as generating the crc. forn(i, len_data) { if (!current_bits[ 0 ]) { forn(j, len_divisor- 1 ) { current_bits[j] = current_bits[j+ 1 ]; } current_bits[len_divisor- 1 ] = data[i+len_divisor]; } else { forn(j, len_divisor) { current_bits[j] = current_bits[j]^divisor[j]; } forn(j, len_divisor- 1 ) { current_bits[j] = current_bits[j+ 1 ]; } current_bits[len_divi...
Comments
Post a Comment
Give your feedback!
DO NOT SPAM !!
NO THIRD PARTY PROMOTIONAL LINK !!!! (else comment will be deleted.)