Source code for python programs

How to Setup app-ads.txt file in admob

Image
  AdMob provides a personalized code snippet that makes setting up your app-ads.txt file easier. The customized code snippet includes your publisher ID.  Note that your  publisher ID  must be included and formatted correctly for your app-ads.txt file to be verified.  To get your personalized code snippet, which includes your publisher ID: Sign in to your AdMob account at  https://apps.admob.com . Click  Apps  in the sidebar. Click  All apps . Click the  app-ads.txt  tab. Click  How to set up app-ads.txt .  Click next to the code snippet to copy.  Paste the code snippet into your app-ads.txt file. 

Open the Web browser with speech recognition in python program

 Hi guys here you can build a program in python who open the web browser when you speak the program get the command and open the web browser you must enjoy it you can use in your program and add more functionality.

import speech_recognition as sr

import webbrowser

 

r1 = sr.Recognizer()

r2 = sr.Recognizer()

r3 = sr.Recognizer()

 

with sr.Microphone() as source:

    print('[search shabdkosh: search youtube]')

    print('speak now')

    audio = r3.listen(source)

 

if 'youtube' in r2.recognize_google(audio):

    r2 = sr.Recognizer()

    url = f"https://www.youtube.com/results?search_query"

    with sr.Microphone() as source:

        print('search you query')

        audio = r2.listen(source)

 

        try:

            get = r2.recognize_google(audio)

            print(get)

            webbrowser.get().open(url+get)

 

        except sr.UnknownValueError:

            print('Error')

 

        except sr.RequestError as e:

            print('failed'.format(e))


Comments

Popular posts from this blog

Currency converter code for android studio

Login Python Source code

Make your own Jarvis in python