If you go to Google Translate, you can not only translate text from one language to another, but you can also listen to the translation. For example, this English to Chinese translation allows you to listen to the pronunciation of the Chinese text.
Google’s Cloud Text-to-Speech API allows you to programmatically generate mp3s of any text. Below are steps to do it on Windows using PHP.
When you follow the steps above, you will download a JSON file containing your credentials. You need to set an environment variable by opening a command prompt and entering
set GOOGLE_APPLICATION_CREDENTIALS=path-to-json-file
You can then verify it is set by typing “set”.
That environment variable is temporary and will persist for the duration of the terminal session. To set the environment variable permanently, follow these steps.
Composer will need a php.ini file. If one doesn’t exist, it will create one.
4. Update php.ini
To ensure your SSL certificates are up-to-date, download the latest cacert.pem from https://curl.haxx.se/ca/cacert.pem. Then, edit php.ini as follows:
curl.cainfo=”/path/to/downloaded/cacert.pem”
5. Create PHP Script
Copy and paste the example code from the instructions in step 1. This is a PHP script so wrap the code in <?php … ?>. Save it as test-text-to-speech.php somewhere.
6. Run PHP Script
At the command prompt, verify the Google environment variable is set and then run the PHP script. If PHP is in your path, you can run, for example,
This will output an audio file (output.mp3) in the same folder. By default, the text is “Hello, world!” and the language code is en-US. You can change the text to Chinese, for example: 这是一个测试 and change the language code accordingly to cmn-CN. Then, you’ll get the same speech as what you hear in Google Translate.
Fence gate locks are usually simple locks that can only be opened from one side. There are times, however, when you wish you could just open the gate from outside instead of opening the main door to your house and then walking all the way to open the gate from the inside. One popular two-sided gate lock is YardLock. It’s a keyless gate lock that costs $55 on Amazon.
Another option is to install a traditional keyed deadbolt lock. You can also get one that allows rekeying the lock so that you can use the same key as you have for your main door like this one from Kwikset which costs $35.
Of course, you’d also need to drill 3 holes for the lock and the bolt like you would for a traditional door. Here’s an example of an attempt at this approach. The photos below show how the lock looks from the outside. For weather protection, I just cover the lock a piece of fence wood attached to a door hinge. Instead of a fancy knob, I just screwed a metal clamp into it.
The photos below show how the lock looks from the inside.
It’s not as elegant of a solution as the Yardlock although it can be made to look elegant. It does have the advantage of being more secure than the Yardlock.
Not everyone has specialized skills or the ability to get a 4 year degree or higher due to their unique circumstances. Though having a college education normally results in higher pay, you don’t always get paid more for having a higher education. One must wonder, then, what is the highest paying job for the lowest level of education. Fortunately, the US government collects labor data and provides a ton of information to help people compare careers, salaries, education requirements, and more. This information is updated regularly and available at the US Bureau of Labor Statistics Occupational Outlook Handbook website.
Here, we can search for careers starting from the lowest level of education up to having a 2-year associate’s degree. With each search, we can filter by average annual salary. Here are the results. Occupations with salaries below $40,000 a year are excluded.
The occupations in the results above are mostly manual labor jobs like carpentry, landscaping, cooking, construction, driving, farming, machine operating, etc.
Education Level: High school diploma or equivalent
For this education level, the fastest growing occupation is “Computer Support Specialist” with a 2019 Median Pay of $26.33 per hour or $54,760 per year.
For this education level, there is only one occupation in the $80,000 more category. It is “Electrical and Electronics Installers and Repairers” with a 2019 Median Pay of $28.40 per hour or $59,080 per year. However, this occupation is in decline and not growing.
On the summary page for “Electrical and Electronics Installers and Repairers” we find a link for how to become a Electrical or Electronics Installer and Repairer. It looks like one would go to a vocational or apprenticeship school and take specific courses to become an electrician. A Google search reveals that in California, you must be licensed and there are 5 types of licenses. You would need to enroll in a State-approved electrician trainee school. For example, one school located in San Leandro, California is called Alameda County Electrical JATC. This is a 5 year program includes 8000 hours of paid on-the-job training during the day and 900 hours of classroom instruction during day and evenings.
Costs:
$620 for books (first year)
$500 for tools
Education Level: 2 Year Associate’s Degree
For this education level, the fastest growing occupation is “Radiation Therapist” with a 2019 Median Pay of $41.14 per hour or $85,560 per year.
People’s faces vary significantly from one to another and with time as they age. Some men lose hair, some women pluck and lose their eyebrows or change the shape of their eyebrows, some men change their beard or mustache style, and last but not least, some people have or develop some natural or accidental issue with their nose, whether it’s crooked, asymmetric, bumpy, droopy, too large, or so shallow that they can’t comfortably where glasses.
For men, the most common operation is probably a hair transplant. For women, the most common operation is probably rhinoplasty (nose job) although many women should probably just get an eyebrow transplant instead of drawing their eyebrows on their skin which looks obviously fake.
Interesting fact: Iran has the highest rate of nose surgery in the world, and according to a report in the conservative Etemad newspaper, as many as 200,000 Iranians, mostly women, go to cosmetic surgeons each year for a nose job. Source
This article explains one way to edit a 3D version of your face. It can be helpful if you are just curious about what a change may look like or if you are trying to explain your desired outcome to someone.
The following image shows the photos I started with (left column), the 3D faces generated from the photos (middle column), and the 3D faces after editing (right column).
1. Take a photo of someone’s face
For demonstration purposes, I took a screenshot of a 3D image of a random person on Sketchfab. You can take just a front photo but it’s better to take pictures of both sides as well.
When taking photos, you should look straight and not tilt your head. You should have neutral gestures (no smiling, etc), and you shouldn’t wear glasses.
2. Load the photos into FaceGen 3D Print
Download FaceGen 3D Print. You can download the demo version. You won’t get all of the features but you may not need all the features. The cheapest paid version costs $69. Install the program, click Create > Photo > and upload the photos from step 1.
3. Mark specific points
FaceGen will then instruct you to mark specific points on your photos so that it can better generate a 3D image.
4. Generate 3D image
After you click the “Create from photo(s)” button, FaceGen will take about 30 seconds to analyze the photos and then generate a 3D image. This technique of generating a 3D image from photos is called Photogammetry. If you have a 3D scanner, you can also load a 3D image.
You can drag the 3D image around in any direction. Since I’m using the demo version, there is a blue FG (FaceGen) watermark on the image.
5. Overlay original photo to check accuracy
The generated 3D image may not be perfect. To fix that, we can overlay our still photos on the FaceGen window and tweak the 3D image to match the photos. One overlay utility that works is called Overlay. After installing it, load your still photo, drag the Overlay window over the FaceGen window, scale the overlaid photo so that the face elements of the overlaid photo and the underlying 3D image are almost the same. You can then see whether the generated 3D image is sufficiently accurate or needs tweaking.
6. Edit the 3D image to match the photos
Click the “Float” button in the Overlay controls. Then, in FaceGen, click Modify > Interactive and edit the 3D image as follows:
Hold down the ‘Ctrl’ key then left-click and drag any point on the face (symmetric).
Hold down the ‘Ctrl’ key then right-click and drag any point on the face (asymmetric).
Symmetric will make changes symmetrically, e.g. if you edit the left eyebrow, then the right eyebrow will get the exact same edits. If you only want to edit one side / location, then use the asymmetric option.
In this step, your goal is to just tweak the 3D image to more closely match the photos.
7. Edit the 3D image to your desired result
After tweaking the 3D image to match the still photos, you can start editing the 3D image to your desired transformation using the same technique as in the previous step. Following are some extreme examples for demonstration purposes.
If you click on Modify > Shape, you can modify preset facial elements, e.g. nose nostril size, etc.
8. Further editing
Though FaceGen has many features, it seems to lack the ability to modify 3D images in certain ways. For example, one complaint many people seem to have is of a hump on their nose.
FaceGen doesn’t seem to have a way to reshape a hump like that. To resolve this, export the 3D image out of FaceGen as an OBJ file.
Then, download AutoDesk MeshMixer. It’s free. Install MeshMixer and import the 3D image you exported from FaceGen. With MeshMixer, you can sculpt your 3D image, e.g. click Sculpt > Brushes > Drag, adjust the strength, size, depth, etc of the brush, and then drag on the 3D image. Since my demo model didn’t have a hump on the nose, I created (an exaggerated) one. Note that all of this editing is in 3D so you can rotate the image around.
Another tool you can use is FaceTouchUp. But, it only works with 2D flat images, which, depending on your needs / goals, may be sufficient.
8. Upload 3D image for sharing
After you export your 3D image as an OBJ file, you can upload it to Sketchfab where you can share it with others. For example, below is an embed of the 3D image I took for this demo.
If you took a screenshot of the 3D image before and after you made edits, you can use a morphing program to show the transformation from the before state to the after one.
3D Scanner
Generating a 3D image from still photos works pretty well. But, you can also create a 3D image of your face (or any object) using a 3D scanner. Revopoint POP 3D Scanner ($500) is one such scanner. It’s supposed to generate a more accurate 3D model by using infrared light to calculate depth. However, it doesn’t capture anything in black so if you have black hair or a black beard, it will not pick those up.
While unit is preheating, pat steaks with paper towel to remove oils, rub canola oil over steaks and sprinkle on salt and pepper
Insert thermometer from the side into thickest part of steak
When unit beeps, add the steaks
When unit beeps again, flip steaks
When unit beeps again, remove steaks and allow to rest for 5 minutes
Grilled Barbecue Chicken Legs
Ingredients
Chicken legs or breast
Kinders Mild BBQ Sauce
Canola oil
Salt
Black pepper
Instructions
Push Grill button
Set temperature to “MED”
Set time to 25 minutes
While unit is preheating, rub canola oil over chicken and sprinkle on salt and pepper
When unit beeps, add chicken and set timer for 10 minutes
After 10 minutes, flip chicken and set timer for 5 minutes
After 5 minutes, liberally baste both sides of chicken with bbq sauce then set timer for 5 minutes
After 5 minutes, repeat previous step and cook for another 2 minutes.
If internal temperature is below 160 F, keep cooking until it reaches 160 F.
When internal temperature reaches 160 F, remove chicken and let rest for 5 minutes
Air Fried Chicken Legs
Ingredients
6 chicken legs
1.5 tsp salt
1 tsp ground black pepper
1 tsp ground mustard
1 tsp smoked paprika
¼ tsp cayenne pepper
1 tbs vegetable oil
Instructions
Add all dry ingredients to a large zip top bag and shake to mix well.
Massage oil on each chicken leg
Add all chicken to bag and shake until all chicken is coated
Let chicken marinate in refrigerator for at least 1 hour. The longer the better. Overnight is best!
Preheat air fryer for 5 minutes at 380 degrees (F). Add chicken to air fryer and use “air fry” setting at 380 degrees (F) for 18-20 minutes, turning chicken halfway through. Internal temperature of chicken should be at least 165 degrees (F).
You’re probably thinking you should buy some chemicals to remove rust or even soak rusty items in Coca Cola, if they’ll fit in your container. These methods only partially work and take forever. Instead, just pick up a polycarbide abrasive wheel at Harbor Freight ($5) and attach it to an angle grinder ($15 at Harbor Freight) and get rid of dust with ease. You might be able to use it to clean your barbecue grill grates.
Have you ever needed to make notes on screen like a web page to then share with others. You might first take a screenshot and then edit it in some program or buy an app like TechSmith SnagIt. A simpler option would be to install the Web Paint extension in Chrome. When you click on the extension, it opens this panel
Then, you can type, draw, add arrows, and so on then take a screen capture and share with others, e.g.
Many, if not most, web forms are backed by a database. But what if you just need a simple data store, like a JSON file, and you want to quickly and easily provide users with a user-friendly web form to make updates to the JSON data. JSON Editor takes a JSON Schema and uses it to generate an HTML form.
The generated JSON output can then be used by a templating language like Handlebars for building a web page.
JSON Editor supports many options including the ability to quickly style a form using CSS frameworks like Bootstrap.
JSON Schema also supports validation so you can ensure your users are not submitting invalid data. For security reasons, this solution may not be good in a production environment by non-trustworthy people but it could work well in a secure, internal environment among coworkers.
Let’s say you have a website and you’re tired of making constant updates to some portion of oft-changing content, e.g. a conference agenda. It would be nice to offload this tedious work to a content owner who so often makes typos. But this content owner is non-technical and is a visual person. They need a WYSIWYG editor that would allow them to make changes directly on what it is that they want to edit, not directly in a database or something cryptic like a JSON file.
HTML5 supports the contenteditable attribute which makes any element editable. In the screenshot below, on a part of the byline is made editable.
Simple add the attribute “contenteditable=true” to the tag that wraps the text you want to make editable.
<p>Last Edited by <span id="author" contenteditable="true">Monty Shokeen</span>
</p>
When the content owner clicks on the text to editor, a black outline appears making it look like a form field.
The contenteditable attribute can be added to as many HTML elements as you want. Here is a live example showing three different editable fields with changes saved to local storage. Here’s an example showing how you can save the changes in JSON format and post it to a URL endpoint using AJAX or Fetch.