TeCoEd (Teaching Computing Education)
  • Home
    • Freelance
    • Book
    • Downloading
  • Python
    • Learn Python >
      • Python Modules
    • PyGame Zero
    • Python Programs >
      • Higher or Lower
      • Magic Calculator
      • Password Checker
      • Python Pit
    • What's News App
    • Pixels to Cells
    • Python Mosaics
    • Python OCR
    • L-1-AM
    • Web Scraping >
      • Scraping Trains
    • Weather App
    • Snakes and Windows
    • Python Web Server >
      • Flask
    • Python Picks
  • Ras Pi
    • All About the Pi
    • Getting Started
    • Remote Desktop and VNC
    • Static IP Address
    • Sonic Pi >
      • 3.14
    • Twitter Feed >
      • Tweepy
    • Android & Pi >
      • Advanced Apps
      • Odds
    • A.I on the the Pi
    • CRON
    • Pick Your Own
  • Pi Hardware
    • Pi HATS >
      • Sense Hat Hacks
      • AstroPi HAT
      • Unicorn-HAT >
        • Unicorn Alphabet Disco
        • Uni Codes / Programs
      • Skywriter
      • Piano HAT
    • STS Pi
    • Pi Camera >
      • Pi-Cam, Python & Email >
        • Time Lapse
      • Pi Noir
    • Pipsta >
      • Flask, Input & Printers
    • Raspberry Pi Power >
      • Energenie IR power
    • Pibrella
    • Distance Sensor
    • LCD Screen
    • Pi-Tooth
    • Robot Arm
    • PiGlow
    • PiFM
    • Accelerometer
    • PiFace >
      • Installing PiFace >
        • Python Commands
  • Pi-Hacks
    • Drone Hacks
    • Pi Glue Gun Hack
    • Blinkt!
    • Sonic Pixels
    • R2D2
    • Get to the chopper
    • Astro Bird
    • Twitter Translator
    • Hacking a Robot
    • Nature_Box >
      • Best Nature Photos
    • Wearable Tech >
      • Project New York
      • P.N.Y Part 2 Health
      • P.N.Y Part 3 Games
      • P.N.Y Part 4 Translation
    • Dino-Tweet
    • Other Links
  • Pi-Hacks 2
    • The Joker
    • Hologram Machine
    • Google Vision: Camera Tell
    • Yoda Tweets
    • Pi Phone
    • Darth Beats
    • Twitter Keyword Finder
    • Crimbo Lights Hack
    • Xmas Elf
    • Halloween 2016
    • Halloween Hack 2015
    • Socrative Zombie
    • Voice Translation
    • The Blue-Who Finder
    • GPIO, Twitter
    • Pi Chat Bot >
      • Dictionary Definitions
    • PiGlow & Email
    • Pibrella Alarm System
    • SMS with Python >
      • Spooking a Mobile
  • Pi-Hacks 3
    • LED Dance Suit
    • Ferminal
    • Crypto Tracker
    • David Bowie
    • Lamp Prank >
      • TEST
    • Yoda FM
    • Retro Player
    • LED Pixel Art
    • TARDIS
    • Battleships
    • LED Board
    • Night Vision
    • Enviro+ Weather
  • Minecraft
    • Minecraft API
    • Minecraft Sweeper
    • PiGlove: Minecraft Power Up
    • Minecraft Photo-booth
    • Rendering Pixels
    • Speed Cube
    • Lucky Dip
  • Computing
    • Why Computing?
    • Can You Compute
    • micro:bit
    • Coding Resources
    • Learn to Code >
      • Coding with iPads
      • Apps Creation Tools
      • sKratchInn
      • Sound Editing
    • Cheat Sheets
    • Theory
    • HOUR OF CODING
    • BEBRAS Computing Challange
    • Computer Facts
    • Free Software and Links
  • Contact Me
  • Random Hacks
    • Movile

Project Halted at 1/1/2016

Project New York
returns for the 4th iteration of the glove.  This time the glove enables the user to translate between English and a range of foreign languages.  Image you are sat in a lovely sunny Italian cafe, the waiter approaches and asks says something.  Use the glove to convert their words into English and then speak your response back, in English.  The glove translates your words back into Italian and speaks them back to the waiter.

Update 1: 20/9/2015 USB Microphone Issues:  The original translation program I made used a USB microphone which meant that the audio had to be routed through the USB ports.  This was done bu modifying the sudo nano /etc/modprobe.d/alsa-base.conf file  However, this version of the program requires the recorded sound, the translation, to be played back to the user.  The issue here was that the USB microphone was not a speaker so no sound is played back and you cannot use the audio jack as this is not in use as you have routed the audio through the USB. The solution was simple, I had to buy a USB to audio converter, this enables you to still use the USB port as the main audio but you can add a microphone and a pair of headphones.

Update 2: 23/9/2015 eSpeak:  Python espeak was installed to enable the translated phrases to be read back to the user. For example the code phrase = translator.translate(microphone_input) is used to translate the the spoken words , then the string is tidied up to extract the 'phrase', for example final_phrase = read[sentence+5 : end_of_phrase]  The translated phrase is stored as a variable called 'phrase', then eSpeak is called using espeak.synth(phrase") 
Picture

Picture
Update 3: 27/9/2015:Unicode arrrhhh!!  This caused many a headache.  Basically when speaking and converting the words from English to say French with the code phrase2 = translator.translate(microphone_input, dest='fr')  It returned an error.  This is because the French accents are not recognised.  In a nutshell the letters / words, the string is stored as ASCII values.  This assigns a  numeral value to each letter and symbol, for example the letter a has a value of 97 up to a total value of 127.  The problem with the translation with say, french letters is that they are out of the range of the ASCII code values.   For example the umlaut, ö has a value of U+00F6, which is well out of the range of ASCII!  This meant that I could not translate from English to another language.   This system to use is known as utf-8 (universal text format).  To encode the text correctly and then translate corectly I had to set the input as utf-8 I used phrase2 = unicode(translator.translate(microphone_input, dest="fr")) to ensure it was correct. This also works the other way round where eSpeak cannot identify the foreign letters and they need to be converted back into ASCII, this uses the code line, final_phrase2 = final_phrase2.encode('ascii', 'replace')
You can read more about Strings, ASCII and Unicode utf-8 here and the individual letter values here

Powered by Create your own unique website with customizable templates.