banner



Raspberry Pi 4 Pwm Fan Control

How to control the Raspberry Pi with your phonation

Make your own Alexa

Vocalization-activated devices such as the Amazon Repeat are condign e'er pop, and you tin can make your own using a Raspberry Pi, an cheap USB microphone and some suitable software.

You as well tin can have your Raspberry Pi search YouTube, open up web pages, launch applications and even respond to questions, simply by speaking.

The Raspberry Pi has no congenital-in soundcard or audio jack, so you need a USB microphone or a webcam with built-in microphone for this project. We tested the software using a Microsoft Hard disk drive-3000 (opens in new tab) webcam, just any uniform device will practise. Visit there'southward a total list of Raspberry Pi-compatible webcams (opens in new tab) if yous do not already take one, merely be sure that whatever device you choose has an integrated microphone.

  • Raspberry Pi projects

See whether you can find a USB microphone or webcam

Meet whether you lot can find a USB microphone or webcam

If y'all only have a microphone with an audio jack, try searching Amazon or eBay for an inexpensive USB soundcard, which plugs into the USB port at i end and has an output for earphones and a microphone at the other.

There's a number of speech recognition programs for the Raspberry Pi. For this project, we're using Steven Hickson's Pi AUI Suite, because information technology's powerful as well as extremely piece of cake to gear up and configure.

Getting started

Once y'all follow the steps in the tutorial, you volition be able to start the installer. The Pi AUI Suite gives yous a choice of a number of programs to install. The showtime question you lot are asked is whether it should install the dependencies.

These, quite simply, are the files the Raspberry Pi needs to download for vocalization commands to work, so select Y and press Render to agree to this.

Next, you are asked if y'all desire to install the PlayVideo programme, which enables you lot to use voice commands to launch and play video files.

If you choose Y, you're asked to specify the path to your media files – for instance, /home/pi/Videos. Notation that upper-case letters are important here. If the path is invalid, the program warns you lot.

If you have a mic with an audio jack, you may be able to use a small USB soundcard to make it work with the Raspberry Pi

If you lot have a mic with an audio jack, you may be able to use a small USB soundcard to make information technology work with the Raspberry Pi

Yous're and then asked if y'all want to install the Downloader program, which searches for and automatically downloads files from the internet for yous. If you choose Y here, you're asked to provide settings for host, port, username and password.

If yous aren't sure of these, press Render for now to cull the default options in each case.

The post-obit plan is Google Text to Speech Service, which you may wish to install if you want the Raspberry Pi to read out the contents of text files. In gild to utilize this service, the Raspberry Pi needs to be connected to the internet, because information technology connects to Google'due south servers to 'translate' the text into speech, and so plays an audio file with the Raspberry Pi's media player.

If you decide to install this, y'all demand a Google account. The installer asks you to enter your username. Exercise and then, then printing Return. You're then prompted for your Google password. Enter this and printing Return once more.

The installer also offers you lot the take a chance to install Google Voice Commands. This uses Google's own spoken language recognition service. Over again, you're asked to provide your Google username and password to go along.

Whether or non yous choose the Google-specific software, the program too asks y'all whether y'all want to install the YouTube scripts. These tools enable you to speak a phrase such equally "YouTube fluffy kittens", which then causes a relevant video prune to be played.

Simply type a new greeting and press Return. You can also set the quiet flag, so the Raspberry Pi doesn't respond verbally.

Only type a new greeting and press Render. You can besides fix the quiet flag, so the Raspberry Pi doesn't respond verbally.

Finally, the program gives yous the choice to install Voicecommand, which contains some of the more useful scripts, such as beingness able to launch your web browser by saying the word "internet".

The programme asks you lot if you desire to permit Voicecommand prepare itself upward automatically. If you feel an fault at this stage, follow Step 3 of the walkthrough on the next page.

Basic vocalism commands

One time installation of Pi AUI Suite is complete and you have run sudo voicecommand -c to gear up it to listen, you need to prime it with a keyword.

By default, this is "Pi", merely experience complimentary to alter this to something easier, such equally the give-and-take "Alexa" if you want an Amazon Adjacent, try out a few of the built-in voice commands.

Youtube: Saying "YouTube" and a video championship automatically loads a full-screen video of the first relevant YouTube clip.

This is similar to Google's "I'm feeling lucky". Say "YouTube" and the name of the video in which yous're interested – for case, "YouTube fluffy kittens".

Internet: Saying the word "net" launches your web browser. By default, this is the Raspberry Pi's congenital-in browser Midori, although you can modify this.

Download: Saying the discussion "download" plus a search term automatically searches the Pirate Bay website for the file in question – for example, you could say "Download Ubuntu Yakkety Yak" to get the latest version of the Ubuntu Linux operating system.

Play: This command uses the builtin media player to play a music or video file – for instance, "Play mozartconcert.mp4" would play that item file located in the media folder you lot specified in setup, such as /dwelling/pi/Videos.

Evidence me: Saying "evidence me" opens up a folder of your choice. By default, the command doesn't become to a valid binder, and so you need to edit your configuration file to a valid location – for instance, show me==/home/pi/Documents.

Raspberry Pi'southward master'south vocalization

One time the Voicecommand plan is installed, yous may wish to make a few basic changes to the setup before fine-tuning your configuration.

Open Concluding on your Raspberry Pi or connect via SSH and run the control sudo voicecommand -s .

You lot are asked a serial of yes/no questions next. The first question asks whether you want to permanently set the continuous flag. In obviously English, the Voicecommand plan is asking whether, each fourth dimension you run information technology, you desire it to continuously listen for your voice commands.

Select Y for at present. Next, yous are asked if you want the Voicecommand program to permanently set up the verify flag. Selecting Y here means the program expects you to say your keyword (by default, the give-and-take "Pi") before responding to commands.

This tin be useful if y'all want to gear up the Raspberry Pi to listen continuously and don't want it to act on everything yous say.

The following prompt asks if you want to permanently gear up the ignore flag. This ways that if Voicecommand hears a command that's not specifically listed in your configuration file, it tries to look for a program in your installed applications and run information technology.

For instance, if you lot say the word "leafpad", which is a notepad application, Voicecommand searches for and runs this even if not specifically told to.

Nosotros do not recommend you enable this feature. Because you're running Voicecommand as a SuperUser, there'due south too much gamble that you could inadvertently tell the Raspberry Pi a control that could harm your files.

If y'all want to gear up up actress applications to work with Voicecommand, you can edit the configuration file in each specific case.

Voicecommand and then asks you whether you wish to permanently ready the quiet flag, so information technology doesn't requite a verbal response when you speak. Choose Y or N equally you lot come across fit. Next, y'all're asked if y'all want to alter the default elapsing for spoken communication recognition. You lot should only change this if you're finding the Pi is having trouble hearing your commands.

If yous choose Y, you're asked to type in a number – this is the number of seconds that the Raspberry Pi listens for a voice command, and the default is 3.

The program and then gives you a chance to set the text-to-spoken language options. Be sure to turn up your volume earlier doing this. The program attempts to say something and asks whether you accept heard it.

Use the up arrow to maximise the capture volume of your device (in this case, we're using a Microsoft USB webcam)

Use the up pointer to maximise the capture volume of your device (in this case, we're using a Microsoft USB webcam)

The default response of the organization when responding to your keyword is "Yes sir?" Choose Y on the next prompt to modify this, then blazon in your desired response, such equally "Aye ma'am?"

Press Return when you're washed. The arrangement plays back the response for y'all to confirm whether y'all're happy with the outcome.

The procedure is the same for the default bulletin for when the system receives an unknown control. The default response is "Received improper command," only you can change this to something less robotic if you prefer past typing Y, then your called response – for instance, "Unknown command."

You are now offered the risk to set up the speech recognition options. This automatically checks whether you have a uniform microphone installed. Voicecommand side by side asks you if you want the Pi to bank check your audio threshold for y'all.

Make sure at that place is no background dissonance, press Y, and so Return. Information technology so asks you lot to speak a command to check that it has the right sound device selected. The program automatically determines the right audio threshold for you, and so type Y to cull this.

Finally, the Raspberry Pi asks you if you desire to change the default keyword ("Pi") to actuate voice commands. Type Y, then enter your new keyword. Press Return when done.

You are then asked to speak your keyword to acclimatise the Raspberry Pi to your speaking voice. If this seems correct, type Y to complete the setup.

Follow Step 6 of the tutorial on the adjacent folio to run the Voicecommand software. Try to first out with a few simple commands. (See Bones Voice Commands boxout for details).

Once y'all're comfy with these, run the control sudo killall voicecommand to shut downward the program and edit your configuration file if you wish.

Vox control tweaks

Once your Voicecommand software is up and running, you can edit the configuration file to add together new commands or modify existing ones.

Run the command sudo nano /root/.commands.conf to view the configuration file.

As you lot'll see, nigh of the lines begin with a # symbol, which means the Raspberry Pi ignores them.

Delete the symbol to activate the line. If, for instance, you want to alter the keyword that activates the voice recognition software from "Pi" to "Alexa", you would change the line from #!keyword==pi to -!keyword=alexa.

If you use the Firefox web browser instead of Midori, you may also want to change ~Cyberspace==midori & to ~Internet==firefox-esr &.

The software can run whatever command. For instance, to open up the desktop by saying the give-and-take "desktop", add together the post-obit line to the end of the file: desktop==home/pi/Desktop

Yous can also launch programs as you would from the concluding – for example, notepad==leafpad

As you're talking to the Raspberry Pi, you may desire it to respond. Exercise this first by opening Final and installing the spoken language synthesis software Festival with the following control:

sudo apt-become install festival

The basic format to get the Raspberry Pi to talk is echo "Your message here" | festival –tts

You can also have the Raspberry Pi read out system information. For example, if you wanted the Raspberry Pi to tell you lot the engagement and fourth dimension, yous would add the following line to the config file:

time==repeat "The time is" | festival --tts &&

date | festival –tts

Vexing voices

Voice recognition software is a piece of work in progress and the Raspberry Pi may not recognise everything you say.

To improve your chances, be sure to stay near the USB microphone and speak slowly and conspicuously.

If you're still having trouble being understood, open Terminal on your Raspberry Pi or connect via SSH and run the command alsamixer to open your audio settings.

Press F4 to choose sound input, then press F6. Use the arrow keys to select your USB device, then press Render. This controls the book of your USB microphone. Apply the upwardly pointer to push it to maximum (100).

If your device isn't existence detected at all, information technology may demand more than ability than the Raspberry Pi's USB ports can provide on their own. The all-time solution for this is to use a powered USB hub.

Once the Download programme is installed, if you experience an error connecting, bear in mind that admission to the PirateBay website may be restricted where you are.

In order to download files, you also need a BitTorrent client for the Raspberry Pi, such as the program Transmission. You tin can install this past opening Last or connecting to your Raspberry Pi over SSH and running the command sudo apt-get install manual.

Help with getting started and how to use the customer is bachelor from the Manual website (opens in new tab). Needless to say, y'all should simply download files with the permission of the copyright holder.

If you choose to employ Google Voice Commands or Google TTS (Text to Speech), bear in mind that anything you say and any text files you submit are sent to Google's servers for translation.

Google claims non to retain any of this information, merely even if information technology is to exist believed, any data transmitted over the internet can potentially be intercepted by a third political party.

Google does encrypt your connectedness to reduce the chance of this happening, however.

If you find you're happy with the voice command feature, you might prefer the software to kickoff automatically each time yous boot the Raspberry Pi. If so, open Terminal on your Raspberry Pi or connect via SSH and run the following command:

              sudo nano /etc/rc.local            

This opens the file that determines which processes start upwards when your Raspberry Pi boots. By default, this script does nothing.

Employ your arrow keys to scroll to the bottom of the file and, just above the line reading get out 0 , type the following:

              sudo voicecommand -c            

Press Ctrl+Ten, and so Y, and then Return to salvage your changes. Feel gratuitous to reboot the Raspberry Pi at this stage to make sure it works.

If you lot're unsure whether Voicecommand is running, open Last and run the control ps -a to show a list of running processes.

  • Notice the best webcam for your Raspberry Pi setup

Raspberry Pi 4 Pwm Fan Control,

Source: https://www.techradar.com/sg/how-to/how-to-control-the-raspberry-pi-with-your-voice

Posted by: sinquefieldwhicee.blogspot.com

0 Response to "Raspberry Pi 4 Pwm Fan Control"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel