Speech module of the

English and Russian bilingual ghost.pl AI in Perl

Mens Latina in Latin -- MindForth for Robots


1. Cognitive architecture Diagram of the Speech Mind-Module

   /^^^^^^^^^\Speech module says auditory phonemes /^^^^^^^^^\
  / visual    \               __________          / auditory  \
 /  memory     \          |  / Volition \        /  memory     \
|   _______asso-|ciative  |  \__________/       |  ___________  |
|  /image  \rec-|ognition |    ___|_____        | / MindBoot  \ |
| / percept \---|---------+   / EnThink \       || memory vault||
| \ engram  /   |tag     c|f  \_________/       ||             ||
|  \_______/    |        o|i   ____|_______     || "students"  ||
|               |        n|b  / Indicative \    || "read"      ||
|               |        c|e  \____________/    || "books"     ||
|               |        e|r _______|_______    | \___________/ |
|               |        p| / EnNounPhrase  \   |               |
|   _______     |        t| \_______________/   |   ________    |
|  /fresh  \    |     ____V_        _|_____     |  /        \   |
| / image   \   |    / Psy  \      /       \    | / aud      \  |
| \ engram  /---|---/concepts\    / Speech  \---|-\ phonemes /  |
|  \_______/    |   \________/    \_________/   |  \________/   |


2. Purpose of the AI4U Textbook Speech Module

The purpose of the Speech module is to output words of natural language as text on-screen or as phonemic sounds.


3. Algorithm of the AI4U Textbook Speech Module

3.A. The Speech module outputs any English or Russian word starting at a given point in auditory memory and continuing until a blank space is encountered at the end of the word in auditory memory.

3.B. So that the AI Mind may "hear itself think", the Speech module sends each phoneme of output back into the AudInput module in a process of re-entry.


4. Code of Speech() from ghost327.pl AI source code in Perl


# 2015may28 Requirements of Speech mind-module:
# Speech module shall output a single word starting at given @ear point. 
# Outputted word shall be fed internally into the ReEntry module. 
# Inflected nouns and verbs shall be spoken from NounGen or VerbGen.  
sub Speech() {  # http://ai.neocities.org/Speech.html
  if ($age > $cns) { die "TERMINATING: memory full \n"; }  # 2016jan28
  $pho = " "; AudInput(); # 2017-12-07: prime AudInput with a 32=SPACE
  $audstop = 0;  # 2017-03-31: Initially false value of flag
  $pov = 1;    # 2017-03-27: only internal POV thinking uses speech module.
  $t2s = $aud;  # 2016feb13: start from the auditory recall-vector $aud
  $rv = 0;  # 2017-04-07: [MindForth] Let AudInput designate recall-vector "rv".
  do {        # PERL by Example (2015), p. 194: do/until Loops
    my @aud=split(',',$ear[$t2s]);  # 2016jan28: expose @ear values
    $output = "$output" . "$aud[0]";  #2016apr09: commenting back in
    print "$aud[0]";  # 2016mar29: say each character
    $pho = $aud[0];  # 2017-03-27: for reentry into AudInput.
   if ((ord $pho) == 0) {  # 2017-03-31: if space detected...
     $pho = " "; # 2017-03-31: blank SPACE-32
     $audstop = 1;  # 2017-03-31: flag to end a word with a space
   }  # 2017-03-31: end of test for a blank space.
    if ((ord $pho) == 13) {  # 2017-03-31: including any 32=SPACE...
      $pov = 2; # 2018-07-01: after 32=CR (carriage return)
      print $pho;  # 2017-12-21: say or display "pho"; TEST
      $lastpho = $pho;  # 2017-03-31: to avoid extra "S" on verbs 
    }  # 2017-03-31: end of constantly keeping track of last pho.
    if ((ord $pho) == 32 || (ord $pho) == 13) {  # 2017-03-31: SPACE or CR
      $audstop = 1;   # 2017-03-31: flag for finding end of word
      $spacegap = 1;  # 2017-03-31: identify presence of a space
      print $pho;  # 2017-03-31: say or display "pho" 
    }  # 2017-03-31: end of test for 32=SPACE or 13=CR.
    AudInput();  # 2017-03-27: input each phoneme, not entire idea.
    if ($audstop == 1) {  # 2017-03-31: flag found for end of word?
      if ($spacegap == 1)  {  # 2017-03-31: space found?
        $t++;  # 2017-03-31: increment internal AI time "t"
        $audrun = 1;  # 2017-03-31: resetting at end of internal word.
        $pho = " ";  # 2017-04-01: send SPACE-31 into AudInput?
        AudInput();  # 2017-04-01: one last call to AudInput()
        $len = 0;  # 2017-06-20: at end of word, reset length $len; 2017-06-20
        $t++;      # 2017-06-20: increment time-t by one unit? TEST
        $spacegap = 0;  # 2017-03-31: reset
      }  # 2017-03-31: end of test for a space.
    }  # 2017-03-31: end of test for end-of-word flag.
    $pov = 1;    # 2016apr08: internal point-of-view during thinking.
    $t2s++ ;   # 2016mar10: Increment time-to-speech to advance thru memory. 
    if ($aud[0] eq " ")  { # 2016apr29: if no character is found
      $audrv = $t2s;  # 2015may13: Prepare for next word in memory.
      if ($pho eq chr(13)) { $pov = 2 }  # 2017-03-31: for sake of pause-counter
      return;         # 2015may13: Exit at end of a word
    };  # 2015may13: End of if-clause
  } until $t2s eq $cns;  # Show the whole array of AI Mind memory.
  $phodex = 1;  # 2019-10-22: reset for AudBuffer()
}  # 2019-10-22: Speech() returns to EnNounPhrase() or other generative module. 


5. Variables for the Speech Module of the AI Mind

$age -- temporary age for loop-counting.

$audrun -- in the AudRecog() module, which increments audrun, it is a counter of how many times the incrementing module has been called. If the audrun count is at unitary one or below two, then the initial character at the start of a word is being processed. audrun is reset to one in the AudInput() and FileInput() modules.

$audrv -- auditory recall-vector for Speech mind-module.

$audstop -- flag to stop Speech module after one word. The Speech module lets a CR-13 carriage-return or a SPACE-32 change the audstop flag from its zero value at the start of Speech to a unitary one (1), so that audstop and spacegap may work together to send the final non-letter into the AudInput module.

$cns -- (adjustable) size of "central nervous system" memory in the First Working AGI.

$len -- length, for avoiding input non-words. The len variable increments with each additional character during AudInput, and is reset to zero at the end of OldConcept and NewConcept.

$lastpho -- device to avoid extra "S" on verbs.

$output -- output string as in JavaScript FirstWorkingAGI.html or ghost.pl AGI.

$pho -- a "phoneme" or character of auditory input.

$phodex -- pho-index counter for AudBuffer(); phodex is reset to unitary one ("1") in the AudInput module and in the Speech module.

$pov -- point-of-view: 1=self; 2=dual; 3=alien. When pov=1, the word "you" is somebody in the external word. When pov=2, the word "you" refers to the self-concept "I" in the AI. When pov=3, the word "you" is interpreted as part of a conversation by a third-party or as a word in a text, not referring to the self-concept of either the AI or of someone talking to the AI.

$spacegap -- a gap to add one post-word space in the Speech module.

$t2s -- auditory text-to-speech index.


6. Troubleshooting and Debugging for AI Mind Maintainers

6.1.a. Symptom: (Something goes wrong.)
6.1.b. Solution: (AI Mind Maintainer devises solution.)


7. Future Development of Speech Module with NLU

The Speech module needs to be converted from displaying text on-screen to outputting phonemic speech sounds.

  • Roadmap to Artificial Intelligence


    8. Resources for Speech Module with NLU


    9. Spread the News on TikTok and Other Venues

    Are you on TikTok? Are you eager to be a ThoughtLeader and Influencer?
    Create a TikTok video in the following easy steps.

    I. Capture a screenshot of https://ai.neocities.org/Speech.html
    for the background of your viral TikTok video.

    II. In a corner of the screenshot show yourself talking about the Speech module.

    III. Upload the video to TikTok with a caption including all-important hash-tags which will force governments and corporations to evaluate your work because of FOMO -- Fear Of Missing Out:
    #AI #ИИ #brain #мозг #ArtificialIntelligence #ИскусственныйИнтеллект #consciousness #сознание #Dushka #Душка #psychology #психология #subconscious #подсознание
    #AGI #AiMind #Alexa #ChatAGI #chatbot #ChatGPT #cognition #cyborg #Eureka #evolution #FOMO #FreeWill #futurism #GOFAI #HAL #immortality #JAIC #JavaScript #linguistics #metempsychosis #Mentifex #mindmaker #mindgrid #ML #neuroscience #NLP #NLU #OpenAI #OpenCog #philosophy #robotics #Singularity #Siri #Skynet #StrongAI #transhumanism #Turing #TuringTest #volition

    A sample video is at
    https://www.tiktok.com/@sullenjoy/video/7233784548264250667


    10. AiTree of Mind-Modules for Natural Language Understanding


    Nota Bene: This webpage is subject to change without notice. Any Netizen may copy, host or monetize this webpage to earn a stream of income by means of an affiliate program where the links to Amazon or other booksellers have code embedded which generates a payment to the person whose link brings a paying customer to the website of the bookseller.

    This page was created by an independent scholar in artificial intelligence who created the following True AI Minds with sentience and with limited consciousness.

  • http://ai.neocities.org/mindforth.txt -- MindForth Robot AI in English.

  • http://ai.neocities.org/DeKi.txt -- Forth Robot AI in German.

  • http://ai.neocities.org/perlmind.txt -- ghost.pl Robot AI thinks in English and in Russian.

  • http://ai.neocities.org/Ghost.html -- JavaScript Robot AI Mind thinks in English.

  • http://ai.neocities.org/mens.html -- JavaScript Robot AI Mind thinks in Latin.

  • http://ai.neocities.org/Dushka.html -- JavaScript Robot AI Mind thinks in Russian.

    The following books describe the free, open-source True AI Minds.

    AI4U -- https://www.iuniverse.com/BookStore/BookDetails/137162-AI4U

    AI4U (paperback) -- http://www.amazon.com/dp/0595259227

    AI4U (hardbound) -- http://www.amazon.com/dp/0595654371

    The Art of the Meme (Kindle eBook) -- http://www.amazon.com/dp/B007ZI66FS

    Artificial Intelligence in Ancient Latin (paperback) -- https://www.amazon.com/dp/B08NRQ3HVW

    Artificial Intelligence in Ancient Latin (Kindle eBook) -- https://www.amazon.com/dp/B08NGMK3PN

  • https://redditfavorites.com/products/artificial-intelligence-in-ancient-latin

    Artificial Intelligence in German (Kindle eBook) -- http://www.amazon.com/dp/B00GX2B8F0

    InFerence at Amazon USA (Kindle eBook) -- http://www.amazon.com/dp/B00FKJY1WY

    563 Mentifex Autograph Postcards were mailed in 2022 primarily to autograph collector customers at used bookstores to press the issue of whether or not the Mentifex oeuvre and therefore the autograph is valuable. These artwork-postcards with collectible stamps may be bought and sold at various on-line venues.

  • https://www.ebay.com
  • https://galaxycon.com/search?q=Mentifex

    See AI 101 AI 102 AI 103 year-long community college course curriculum for AI in English.
    See Classics Course in Latin AI for Community Colleges or Universities.
    See College Course in Russian AI for Community Colleges or Universities.
    Collect one signed Mentifex Autograph Postcard from 563 in circulation.
    See Attn: Autograph Collectors about collecting Mentifex Autograph Postcards.

    Return to top; or to
    Image of AI4U found at a book store
    The collectible AI4U book belongs in every AI Library as an early main publication of Mentifex AI.


    Website Counter