{"id":3801,"date":"2025-04-21T10:15:46","date_gmt":"2025-04-21T10:15:46","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=3801"},"modified":"2025-06-10T06:00:57","modified_gmt":"2025-06-10T06:00:57","slug":"speaktext-ttext-llanguage-ccountry-qclearqueue-hash-function","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/speaktext-ttext-llanguage-ccountry-qclearqueue-hash-function\/","title":{"rendered":"# SpeakText (t:Text{, L:Language}{, c:Country}{, q:ClearQueue}) hash function"},"content":{"rendered":"\n<p>Valid for use with hash command:&nbsp;<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/\">HMI<\/a> <\/code>Arguments may be specified as&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/namevalue-pairs-in-hash-functions\/\">Name:Value Pairs<\/a><\/p>\n\n\n\n<p>Implemented on the following platforms: Android, Windows (altered functionality).<\/p>\n\n\n\n<p>Speaks out loud the supplied\u00a0<code>Text<\/code>. See\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/hmi-deprecated-functions\/oldspeaknumbfnumb-f-p\/\">OldSpeakNumb<\/a><\/code>\u00a0for speaking numbers. Does not speak out loud in Windows; instead it shows a dismissible text box.<\/p>\n\n\n\n<p><code>Language<\/code>&nbsp;is the language to be spoken, and is specified as two lower case letters.&nbsp;<a href=\"http:\/\/en.wikipedia.org\/wiki\/List_of_ISO_639-1_codes\">Language codes<\/a>. The target language must be installed in the Android device.<\/p>\n\n\n\n<p><code>Country<\/code>&nbsp;is the country specific variant (&#8220;dialect&#8221;). This is specified as two upper case letters.&nbsp;<a href=\"http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1_alpha-2\">Country codes<\/a>.<\/p>\n\n\n\n<p><code>ClearQueue<\/code>, if a non-zero number will result in any previously queued text being deleted. Otherwise the text for successive Speak functions is queued up.<\/p>\n\n\n\n<p>Any of the arguments can be empty (with a necessary comma). If language\/country are never specified the default setting on the Android device will apply.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Example:<\/h6>\n\n\n\n<p>The following program contains 3 calls to\u00a0<code>SpeakText()<\/code>. The first call, during initialisation, sets language and country, with no text. The second call, in the\u00a0<code>evHelloWorld<\/code>\u00a0event handler subroutine has no\u00a0<code>ClearQueue<\/code>\u00a0flag. The third call has\u00a0<code>ClearQueue<\/code>\u00a0set (non-zero). This results in the spoken message &#8220;stomping on&#8221; any other speech that&#8217;s in train. The example also illustrates the use of the\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/hmi-deprecated-functions\/oldspeaknumbfnumb-f-p\/\">OldSpeakNumb<\/a><\/code>\u00a0hash function. The program is written for an MS121 with a BT-TTL5 Bluetooth adaptor.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#       Open_Serial User(38400,8,N) <br>        GoSub           HMI_Connect    ;Paint the initial screen<br>#       <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o5243\">HMI<\/a> ConnectEvent(HMI_Connect)  ;Declare the handler for the Connected event   <br>#       HMI SpeakText(t:\"\", L:\"en\", c:\"AU\",) ;Set the language\/country for speech<br>        LaunchTask      HeartBeat      ;Blink an output to show we are alive<br>        LaunchTask      Crash          ;Catch an input, crash to get back control of serial port<br>        RunTasksForever<br><br>;Connected event: Paint the screen<br>HMI_Connect: <br># HMI Reset() Cls() HideAllButtons()   <br># HMI ButtonEvent(, 0.25, 0.2, 3, 0.6, \"Hello World\",  evHelloWorld)<br># HMI ButtonEvent(, 0.5, 0.2, 3, 0.6, \"How are you?\",  evHowRU)<br># HMI ButtonEvent(, 0.75, 0.2, 3, 0.6, \"Count\",  evCount)<br>        Return          <br>        <br>evHelloWorld:<br>#       HMI SpeakText(t:\"Hello world\")<br>        Return<br>        <br>evHowRU:<br>#       HMI SpeakText(\"How are you?\",,,1)        ;Will pre-empt previous speeches.<br>        Return      <br><br>evCount:<br>#       HMI SpeakText(t:\"Count is \") SpeakNumb(f(*fCount, 5, 1))  <br>        fRecallW        fCount  <br>        fLoadQ          0.1<br>        fAdd<br>        fStore          fCount<br>        Return        <br>fCount defFLOAT       <br>********************* Minor stuff ***************************************************        <br>;Blink an output to signal the program is running<br>HeartBeat:<br>        On              8<br>        Pause           1<br>        Off             8<br>        Pause           25<br>        GoTo            HeartBeat        <br>                <br>;Deliberately crash the program to get back control of the serial port, so SPLat\/PC can connect.<br>Crash:  WaitOnK         12<br>Here    GoSub           Here   <\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Valid for use with hash command:&nbsp;HMI Arguments may be specified as&nbsp;Name:Value Pairs Implemented on the following platforms: Android, Windows (altered functionality). Speaks out loud the&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3768,"menu_order":21,"template":"","class_list":["post-3801","spl_knowledgebase","type-spl_knowledgebase","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title># SpeakText (t:Text{, L:Language}{, c:Country}{, q:ClearQueue}) hash function - SPLat Controls<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"# SpeakText (t:Text{, L:Language}{, c:Country}{, q:ClearQueue}) hash function - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"Valid for use with hash command:&nbsp;HMI Arguments may be specified as&nbsp;Name:Value Pairs Implemented on the following platforms: Android, Windows (altered functionality). Speaks out loud the...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/speaktext-ttext-llanguage-ccountry-qclearqueue-hash-function\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T06:00:57+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/speaktext-ttext-llanguage-ccountry-qclearqueue-hash-function\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/speaktext-ttext-llanguage-ccountry-qclearqueue-hash-function\/\",\"name\":\"# SpeakText (t:Text{, L:Language}{, c:Country}{, q:ClearQueue}) hash function - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-21T10:15:46+00:00\",\"dateModified\":\"2025-06-10T06:00:57+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/speaktext-ttext-llanguage-ccountry-qclearqueue-hash-function\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/speaktext-ttext-llanguage-ccountry-qclearqueue-hash-function\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/speaktext-ttext-llanguage-ccountry-qclearqueue-hash-function\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Deprecated\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"# HMI Android &#038; Windows\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"# SpeakText (t:Text{, L:Language}{, c:Country}{, q:ClearQueue}) hash function\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\",\"name\":\"SPLat Controls\",\"description\":\"OEM Embedded Machine Controllers\",\"publisher\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization\",\"name\":\"SPLat Controls\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg\",\"contentUrl\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg\",\"caption\":\"SPLat Controls\"},\"image\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"# SpeakText (t:Text{, L:Language}{, c:Country}{, q:ClearQueue}) hash function - SPLat Controls","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"# SpeakText (t:Text{, L:Language}{, c:Country}{, q:ClearQueue}) hash function - SPLat Controls","og_description":"Valid for use with hash command:&nbsp;HMI Arguments may be specified as&nbsp;Name:Value Pairs Implemented on the following platforms: Android, Windows (altered functionality). Speaks out loud the...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/speaktext-ttext-llanguage-ccountry-qclearqueue-hash-function\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-10T06:00:57+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/speaktext-ttext-llanguage-ccountry-qclearqueue-hash-function\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/speaktext-ttext-llanguage-ccountry-qclearqueue-hash-function\/","name":"# SpeakText (t:Text{, L:Language}{, c:Country}{, q:ClearQueue}) hash function - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-21T10:15:46+00:00","dateModified":"2025-06-10T06:00:57+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/speaktext-ttext-llanguage-ccountry-qclearqueue-hash-function\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/speaktext-ttext-llanguage-ccountry-qclearqueue-hash-function\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/speaktext-ttext-llanguage-ccountry-qclearqueue-hash-function\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/"},{"@type":"ListItem","position":2,"name":"Deprecated","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/"},{"@type":"ListItem","position":3,"name":"# HMI Android &#038; Windows","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/"},{"@type":"ListItem","position":4,"name":"# SpeakText (t:Text{, L:Language}{, c:Country}{, q:ClearQueue}) hash function"}]},{"@type":"WebSite","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/","name":"SPLat Controls","description":"OEM Embedded Machine Controllers","publisher":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization","name":"SPLat Controls","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg","contentUrl":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg","caption":"SPLat Controls"},"image":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase\/3801","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase"}],"about":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/types\/spl_knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/users\/1"}],"up":[{"embeddable":true,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase\/3768"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=3801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}