Bernd Ulmann
Published © CC BY

Dragontalk

"Speakjet" based speech synthesizer.

IntermediateShowcase (no instructions)8 hours556
Dragontalk

Things used in this project

Hardware components

SpeakJet
×1

Story

Read more

Schematics

Schematic #1

Code

Code snippet #1

Plain text
  DH IH SE P5 _
  IH SE P5 _
  FF AW FF NE EYRR P5 _
  SE PE IY KE IY NGE _
  P3 _
  FF AW FF NE EYRR P5 _
  IH SE P5 _
  EYIY P5 _
  VV AY KE SE P5 _
  RR AY NE IY NGE P5 _
  VV IY P6 EH MM MM P6 EY SO P6 _
      

Code snippet #2

Plain text
  my %allophone = 
  (
    P0   => [0, 0],    # Pauses
    P1   => [1, 100],
    P2   => [2, 200],
    P3   => [3, 700],
    P4   => [4, 30],
    P5   => [5, 60],
    P6   => [6, 90],
    FAST => [7, 0],    # Play next phoneme with double speed
    SLOW => [8, 0],    # Play next phoneme 1.5 times slower
    STRS => [9, 0],    # Play next phoneme with a bit stress in the voice
    RELX => [10, 0],   # Relax again...
    IY   => [128, 70],
    IH   => [129, 70],
    EY   => [130, 70],
  ... ... ... ...
      

Code snippet #3

Plain text
  my ($duration, $word) = (0, '');
  for my $phoneme (@data)
  {
     if ($phoneme eq '_')
    {
      printf ("%60s: %d ms\n", $word, $duration) if $debug;
      usleep ($duration * 1000);
       ($duration, $word) = (0, '');
    }
    else
    {
      $word .= $phoneme;
      $duration += $allophone{$phoneme}[1];
      print SPEAK chr($allophone{$phoneme}[0]);
    }
  }
      

Code snippet #4

Plain text
  ACCOMPLICE  AH0 K AA1 M P L AH0 S
  ACCOMPLICES  AH0 K AA1 M P L AH0 S AH0 Z
  ACCOMPLISH  AH0 K AA1 M P L IH0 SH
  ACCOMPLISHED  AH0 K AA1 M P L IH0 SH T
  ACCOMPLISHES  AH0 K AA1 M P L IH0 SH IH0 Z
  ACCOMPLISHING  AH0 K AA1 M P L IH0 SH IH0 NG
  ACCOMPLISHMENT  AH0 K AA1 M P L IH0 SH M AH0 N T
  ACCOMPLISHMENTS  AH0 K AA1 M P L IH0 SH M AH0 N T S
      

Code snippet #5

Plain text
  This is a short example of the automatic conversion
  of english text data to phoneme sequences.
       

Code snippet #6

Plain text
  DH IH SE  P5 _
  IH SE  P5 _
  EY  P5 _
  SH AW AW RR TT  P5 _
  IH GE ZZ AY MM PO EY LE  P5 _
  UX VV  P5 _
  DH EY  P5 _
  AW TT EY MM AY TT IH KE  P5 _
  KE EY NE VV AXRR ZH EY NE  P5 _
  UX VV  P5 _
  IH NGE GE LE IH SH  P5 _
  TT EH KE SE TT  P5 _
  ED EYIY TT EY  P5 _
  TT UW UW  P5 _
  M0 P5 _
  SE IY IY KE WW EY NE SE EY ZZ  P5 _
  P3 _
       

Credits

Bernd Ulmann
9 projects • 9 followers
I love all things that can compute, especially analog computers.

Comments