Skip to content

NerdingAndHoarding/Talkie_Phonems

Repository files navigation

Talkie_phonems v21

Talkie_phonems is an extension for the Arduino Talkie speech synthesis library that enables speaking arbitrary English text instead of being limited to prerecorded words and phrases. https://www.youtube.com/shorts/Us3NH-lybHc https://www.youtube.com/shorts/IOxN4iKZLMQ https://www.youtube.com/shorts/L9UZIXNk2-g https://www.youtube.com/shorts/Gyq1AkX3jfI https://www.youtube.com/shorts/OSQ8NwDACGo https://www.youtube.com/shorts/2JLv7BMA-vs https://www.youtube.com/shorts/nLFVI_sGJ74 https://www.youtube.com/shorts/GP4ExmWkwJA https://www.youtube.com/shorts/Us3NH-lybHc https://www.youtube.com/shorts/uVTyykD0YdA

The project adds a lightweight phoneme engine, text normalization, grapheme-to-phoneme (G2P) fallback logic, and serial input processing so text can be converted into phoneme sequences and spoken dynamically on low-resource microcontrollers.

Features

  • Speak full English text dynamically
  • Compatible with the Arduino Talkie LPC speech system
  • Converts words into phoneme sequences automatically
  • Uses a compact exception lexicon for irregular English words
  • Includes fallback G2P rules for unknown words
  • Supports direct phoneme input mode
  • Supports hexadecimal phoneme byte input mode
  • Serial interface for live speech input
  • Optional robot mouth and RoboEyes animation integration
  • Designed for AVR-based Arduino boards

How It Works

The addon extends Talkie by mapping English text into phoneme byte codes that correspond to LPC speech frames in Talkie_vocab_PH.

Speech generation pipeline:

  1. Input text is received through Serial.
  2. Text is normalized and sanitized.
  3. Known irregular words are matched against a compact lexicon.
  4. Unknown words are processed by the fallback G2P engine.
  5. Phoneme names are converted into Talkie-compatible byte codes.
  6. Talkie speaks the generated phoneme stream.
  7. Optional robot mouth and eye animations are synchronized with speech.

Input Modes

1. Word Mode

Normal English text input.

Example:

hello world

The system sanitizes and converts the text into phonemes automatically.

2. Phoneme Mode

Direct phoneme names.

Example:

t a l k i

Useful for debugging, experiments, or manual pronunciation control.

3. Hex Mode

Raw phoneme byte codes.

Example:

1A 0E 2C

Allows direct low-level control of speech output.

Included Components

phonems_serial_v21.ino

Main application sketch handling:

  • Serial communication
  • Text processing
  • Phoneme parsing
  • Speech playback
  • Mode switching
  • Debug output

g2p_fallback.h

Rule-based grapheme-to-phoneme engine.

Handles:

  • Digraphs (sh, ch, th, ng)
  • Vowel combinations
  • Silent-letter patterns
  • Common pronunciation heuristics
  • Double consonant simplification

lexicon_min.*

Compact exception dictionary for irregular English pronunciation.

sanitize.h

Text cleanup and normalization utilities.

robot_mouth.*

Optional phoneme-to-mouth animation output using digital pins.

RoboEyes.*

Animated eye integration synchronized with speech.

Supported Phonemes

The project maps phoneme symbols to byte codes used by Talkie.

Examples include:

b d f g h j k l m n p r s t v w y z
th sh ch ng
short vowels and long vowels
ar or ir ur ow oy

Additional symbolic phonemes are recognized for fallback pronunciation processing.

Hardware Requirements

  • Arduino-compatible AVR board
  • Speaker and amplifier circuit compatible with Talkie
  • Optional robot mouth LED/display hardware
  • Optional RoboEyes display

Goals

The main goal of this project is to transform Talkie from a fixed-word playback system into a lightweight text-to-speech engine capable of speaking arbitrary English input while remaining small enough for embedded hardware.

Use Cases

  • DIY talking robots
  • Retro speech synthesis projects
  • Embedded voice feedback systems
  • Educational phoneme experiments
  • Interactive serial-controlled speech devices
  • Animated robot faces and mouths

Notes

  • The G2P engine is intentionally lightweight and optimized for embedded systems.
  • Pronunciation quality depends on the available phoneme mappings and fallback rules.
  • Some advanced phonemes are recognized symbolically but may not have direct LPC audio mappings.
  • The project prioritizes low memory usage and real-time operation on constrained hardware.

Future Improvements

License

Based on and intended for use with the Arduino Talkie ecosystem. Review the original Talkie library license and any included assets before redistribution.

Original Talkie library of Martin Luther Kings speach https://www.youtube.com/shorts/eE2UBEIczPE https://www.youtube.com/shorts/21-eui0Uiuk

About

Talkie_phonems is an extension for the Arduino Talkie speech synthesis library that enables speaking arbitrary English text instead of being limited to prerecorded words and phrases.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages