Webpage macOS Say Audio Commentary Access Count Tutorial
โœ‚๐Ÿƒ๐Ÿพโ€โ™€๏ธ๐Ÿƒ๐Ÿผโ€โ™‚๏ธ
๐Ÿ“–

Webpage macOS Say Audio Commentary Access Count Tutorial

Webpage macOS Say Audio Commentary Access Count Tutorial

Weโ€™ve got a new player in the Webpage Audio Commentary โ€œIntranet feelingโ€ solution, today, on top of the progress from yesterdayโ€™s Webpage macOS Say Audio Commentary Personalization Tutorial. This new PHP intranet_access_countโšซphp player sits in the Document Root of your (or our RJM Programming) public domain, and its simple job is to return an โ€ฆ

  • access count โ€ฆ
  • of itself

Huh?! Yes, the macOS or Mac OS X MAMP (or other) local web server can access via tweakedinhouse macos_say_recordโšซphp supervisor of macOS say command, new command line as per โ€ฆ

<?php


$icount="0";



if (isset($_GET['docronwork'])) {

exec(str_replace('+',' ',urldecode($_GET['docronwork'])));

if (isset($_GET['andclose'])) {

echo "<html><body onload=' try { if (window.opener) { if (window.opener.callbck) { window.opener.callbck(); } } } catch(exx) { } window.close(); '></body></html>";

} else if (isset($_GET['andsoonclose'])) {

$icount=shell_exec("curl HTTP://www.rjmprogramming.com.au/intranet_access_count.php");

echo "<html><head><script type=text/javascript> function onlwo() { window.close(); } </script></head><body onload=' try { if (window.opener) { if (window.opener.callbck) { window.opener.callbck(); } } } catch(exx) { } setTimeout(onlwo, 2000); '></body></html>";

}

exit;

}


?>

As you can see above, just โ€œgetting throughโ€ to this new โ€œaccess counterโ€ ahead of involving any โ€œclient facing HTML and Javascript callbackโ€ ideas is the second side to its โ€œlynchpinโ€ relationship between the thechanged macos_say_recordโšซjs external Javascript changed arrangements โ€ฆ



var icountmsr=0, jcountmsr=0;

var connectionmsr=true;



function checkjmsr(iois) {

var sfsg=false;

if (iois != null) {

var aconto = (iois.contentWindow || iois.contentDocument);

console.log(11);

if (aconto != null) {

console.log(navigator.platform);

try {

if (iois.src.indexOf('/intranet_access_count.php') != -1) { console.log('aconto=' + aconto); }

if (aconto.document) { aconto = aconto.document; }

if (iois.src.indexOf('/intranet_access_count.php') != -1) { icountmsr=(aconto.body.innerText || aconto.body.contentWindow || aconto.body.contentDocument); if (jcountmsr == 0) { jcountmsr=icountmsr; } else if (eval(icountmsr - jcountmsr) < 2) { connectionmsr=false; } console.log('icountmsr,jcountmsr=' + icountmsr + ',' + jcountmsr); }
console.log(1111);
if (aconto.body != null) {
console.log(2);
if (aconto.body.innerHTML.indexOf('>') != -1) {

console.log(3);

if (iois.src.indexOf(':8888/') != -1) {

console.log(4);

//if (document.URL.indexOf('via=parenthtml') != -1) {

console.log(5);

if (aconto.body.innerHTML.toLowerCase().indexOf('not found') == -1) {

wo_ismsr.close(); //document.getElementById('macos').style.display='inline-block';

wmsrcd=true;

}

}

//}

}

}

} catch(exxx) {

console.log(exxx.message);

//wo_ismsr.close(); //alert(exxx.message);

//wmsrcd=true;

}

}

}

}



function konlmsr() {

document.getElementById('jfh').src='//www.rjmprogramming.com.au/intranet_access_count.php?rand=' + Math.floor(Math.random() * 198767543);


setTimeout(locopencheck, 2500);

setTimeout(huhmsr, 29000);

}



function jonlmsr() {

wo_ismsr=window.open('HTTP://localhost:8888/macos_say_record.php?andsoonclose=y&docronwork=ls', 'ifh', 'top=50,left=50,width=500,height=500'); //'_blank', 'top=50,left=50,width=500,height=500');

setTimeout(konlmsr, 500);

}




function onlmsr() {

if (document.body) {

if (document.body.innerHTML) {


document.body.innerHTML+="<iframe id=ifh name=ifh onload=checkmsr(this); style=display:none; src='//www.rjmprogramming.com.au/About_Us.html'></iframe><iframe id=jfh name=jfh onload=checkjmsr(this); style=display:none; src='//www.rjmprogramming.com.au/intranet_access_count.php'></iframe><a title='Download macos_say_record.php to macOS or Mac OS X MAMP Document Root' onclick=dostuffmsr(); style='position:absolute;z-index:5643;opacity:0.5;top:0px;left:0px;background-color:yellow;' id=msrae>๐Ÿ’ฌ</a><span id=spansel style='position:absolute;z-index:5643;opacity:0.5;top:0px;left:30px;background-color:yellow;'></span>";

setTimeout(jonlmsr, 1900);

} else {

setTimeout(onlmsr, 1000);

}

} else {

setTimeout(onlmsr, 1000);

}



}




setTimeout(onlmsr, 2000);

โ€ฆ to help make this a better way to not offer any functionality that disappoints the user as not available, later!



Previous relevant Webpage macOS Say Audio Commentary Personalization Tutorial is shown below.

Webpage macOS Say Audio Commentary Personalization Tutorial

Webpage macOS Say Audio Commentary Personalization Tutorial

We want more ways for the โ€œcaller HTMLโ€ and the โ€œexternal called Javascriptโ€ to co-operate, on top of the quite rigid and limited rules of yesterdayโ€™s Webpage macOS Say Audio Commentary Tutorial, and thought about โ€œways to add intelligenceโ€ to HTML. XML is a bit more towards what we are after. To make HTML be a bit XML we like โ€ฆ

  • global data attributes is a client side way we like to do this, and we use them both as โ€ฆ
    1. data-commentary global data attribute label used for user to flag commentary directly in the HTML design โ€ฆ and โ€ฆ
    2. data-foundcommentary global data attribute label used for the second way, below, whereby the โ€œcaller HTMLโ€ can co-operate with the โ€œexternal called Javascriptโ€, flagging relevant elements not to repeat audio commentaries
  • in the local Javascript of the โ€œcaller HTMLโ€ define an array as per โ€ฆ


    <script type='text/javascript'>

    var commentary_array=['.tbanner', 'Tbanner is class', '.bbanner', 'Bbanner is class'];

    </script>


    โ€ฆ one we wrote for thechanged calc_use.htm example calling web application, made up of sets of pairs of a โ€œCSS selectorโ€ and an โ€œaudio commentary to link toโ€ and processed via the Javascript โ€ฆ


    function cmgdafmsr() {

    if (event.target.outerHTML.indexOf(' data-foundcommentary=') > event.target.outerHTML.indexOf('<') && event.target.outerHTML.indexOf(' data-foundcommentary=') < event.target.outerHTML.indexOf('>')) {

    wo_ismsr=window.open('HTTP://localhost:8888/macos_say_record.php?andclose=y&docronwork=say' + encodeURIComponent(minusvmsr) + '%20' + encodeURIComponent(event.target.getAttribute('data-foundcommentary')), 'ifh', 'top=50,left=50,width=500,height=500'); //'_blank', 'top=50,left=50,width=500,height=500');

    return true;

    } else if (event.target.outerHTML.indexOf(' data-commentary=') > event.target.outerHTML.indexOf('<') && event.target.outerHTML.indexOf(' data-commentary=') < event.target.outerHTML.indexOf('>')) {

    wo_ismsr=window.open('HTTP://localhost:8888/macos_say_record.php?andclose=y&docronwork=say' + encodeURIComponent(minusvmsr) + '%20' + encodeURIComponent(event.target.getAttribute('data-commentary')), 'ifh', 'top=50,left=50,width=500,height=500'); //'_blank', 'top=50,left=50,width=500,height=500');

    return true;

    }

    return false;

    }





    function cmfmsr() {

    if (!cmgdafmsr()) {

    if (('' + event.target.title) != '') {

    wo_ismsr=window.open('HTTP://localhost:8888/macos_say_record.php?andclose=y&docronwork=say' + encodeURIComponent(minusvmsr) + '%20Title%20is%20' + encodeURIComponent(event.target.title), 'ifh', 'top=50,left=50,width=500,height=500'); //'_blank', 'top=50,left=50,width=500,height=500');

    //alert('Title=' + String.fromCharCode(10) + event.target.title);

    } else if (('' + event.target.value).replace(/^undefined$/g,'').replace(/^null$/g,'') != '') {

    wo_ismsr=window.open('HTTP://localhost:8888/macos_say_record.php?andclose=y&docronwork=say' + encodeURIComponent(minusvmsr) + '%20Value%20is%20' + encodeURIComponent(event.target.value), 'ifh', 'top=50,left=50,width=500,height=500'); //'_blank', 'top=50,left=50,width=500,height=500');

    //alert('Value=' + String.fromCharCode(10) + event.target.value);

    } else if (('' + event.target.outerHTML).indexOf('><') == -1 && ('' + event.target.outerHTML).indexOf('</') != -1) {

    wo_ismsr=window.open('HTTP://localhost:8888/macos_say_record.php?andclose=y&docronwork=say' + encodeURIComponent(minusvmsr) + '%20InnerHTML%20is%20' + encodeURIComponent((event.target.innerText || event.target.contentWindow || event.target.contentDocument)), 'ifh', 'top=50,left=50,width=500,height=500'); //'_blank', 'top=50,left=50,width=500,height=500');

    //alert('InnerHTML=' + String.fromCharCode(10) + event.target.innerHTML);

    } else {

    console.log('OuterHTML=' + String.fromCharCode(10) + event.target.outerHTML);

    }

    }

    }




    function dostuffmsr() {

    var relstrmsr='', exctheremsr=false;

    var iels=0, jels=0, kels=0;

    var elsare=document.getElementsByTagName('*');

    //commentary_array=['.tbanner', 'Tbanner is class', '.bbanner', 'Bbanner is class'];

    for (iels=0; iels<elsare.length; iels++) {

    //console.log(typeof(commentary_array));

    exctheremsr=false;

    if (typeof(commentary_array) === 'object') {

    console.log('yes, array');

    for (jels=0; jels<commentary_array.length; jels+=2) {

    if (commentary_array[jels].trim() != '') {

    if (commentary_array[jels].trim().substring(0,1) == '.') {

    relstrmsr='';

    if (elsare[iels].outerHTML.indexOf(' class="') > elsare[iels].outerHTML.indexOf('<') && elsare[iels].outerHTML.indexOf(' class="') < elsare[iels].outerHTML.indexOf('>')) {

    relstrmsr=' ' + elsare[iels].outerHTML.split(' class="')[1].split('"')[0] + ' ';

    }

    if (relstrmsr.indexOf(' ' + commentary_array[jels].substring(1) + ' ') != -1) {

    elsare[iels].setAttribute('data-foundcommentary', commentary_array[eval(1 + eval('' + jels))]);

    elsare[iels].addEventListener("contextmenu", cmgdafmsr, false);

    exctheremsr=true;

    }

    } else if (commentary_array[jels].trim().substring(0,1) == '#') {

    relstrmsr='';

    if (elsare[iels].outerHTML.indexOf(' id="') > elsare[iels].outerHTML.indexOf('<') && elsare[iels].outerHTML.indexOf(' id="') < elsare[iels].outerHTML.indexOf('>')) {

    relstrmsr=' ' + elsare[iels].outerHTML.split(' id="')[1].split('"')[0] + ' ';

    }

    if (relstrmsr.indexOf(' ' + commentary_array[jels].substring(1) + ' ') != -1) {

    elsare[iels].setAttribute('data-foundcommentary', commentary_array[eval(1 + eval('' + jels))]);

    elsare[iels].addEventListener("contextmenu", cmgdafmsr, false);

    exctheremsr=true;

    }

    } else {

    relstrmsr='';

    if (elsare[iels].outerHTML.indexOf(commentary_array[jels]) == 1) {

    if (elsare[iels].outerHTML.indexOf(commentary_array[jels] + ' ') == 1) {

    elsare[iels].setAttribute('data-foundcommentary', commentary_array[eval(1 + eval('' + jels))]);

    elsare[iels].addEventListener("contextmenu", cmgdafmsr, false);

    exctheremsr=true;

    } else if (elsare[iels].outerHTML.indexOf(commentary_array[jels] + '>') == 1) {

    elsare[iels].setAttribute('data-foundcommentary', commentary_array[eval(1 + eval('' + jels))]);

    elsare[iels].addEventListener("contextmenu", cmgdafmsr, false);

    exctheremsr=true;

    }

    }

    }

    }

    }

    }


    if (exctheremsr || (elsare[iels].outerHTML.indexOf(' data-foundcommentary=') > elsare[iels].outerHTML.indexOf('<') && elsare[iels].outerHTML.indexOf(' data-foundcommentary=') < elsare[iels].outerHTML.indexOf('>'))) {

    iels=iels;

    } else if (elsare[iels].outerHTML.indexOf(' data-commentary=') > elsare[iels].outerHTML.indexOf('<') && elsare[iels].outerHTML.indexOf(' data-commentary=') < elsare[iels].outerHTML.indexOf('>')) {

    elsare[iels].addEventListener("contextmenu", cmgdafmsr, false);

    } else {

    elsare[iels].addEventListener("contextmenu", cmfmsr, false);

    }

    }

    }

โ€ฆ to add a lot more flexibility in user control of โ€œaudio commentaryโ€ content, where the โ€œsayโ€ voice is now another optional dropdown choice in thechanged macos_say_recordโšซjs external Javascript.


Previous relevant Webpage macOS Say Audio Commentary Tutorial is shown below.

Webpage macOS Say Audio Commentary Tutorial

Webpage macOS Say Audio Commentary Tutorial

Itโ€™s been a tweaked PHP web application last talked about at PHP macOS say Supervisor Modes of Use Tutorial, that, consisting of โ€ฆ

โ€ฆ components to a โ€œproof of conceptโ€ webpage audio commentary is an โ€œIntranet feelingโ€ solution.


Previous relevant PHP macOS say Supervisor Modes of Use Tutorial is shown below.

PHP macOS say Supervisor Modes of Use Tutorial

PHP macOS say Supervisor Modes of Use Tutorial

After yesterdayโ€™s Making of Siri on iPhone Plays Spotify Song via macOS say Tutorial, today we turn back to the PHP code that started our foray into โ€œSiri meets sayโ€ thought patterns.

It seems a bit strange to be talking about macOS and command line โ€œsayโ€ commands, and not, on top of its โ€ฆ

  • usual โ€œsurfing the netโ€ via the web browser address bar mode of use โ€ฆ to, today, add โ€ฆ
  • a โ€œcommand lineโ€ mode of use โ€ฆ and โ€ฆ
  • the manufactured feeling โ€œcurlโ€ mode of use

โ€ฆ to its talents so that โ€œsayโ€ on the macOS command line can have equivalencies with โ€ฆ

<?php


if (isset($argv)) { // command line

$commandsofar="say ";

$numargs = sizeof($argv);

if ($numargs > 1) {

if (PHP_OS == "Darwin") {

for ($ii=1; $ii<$numargs; $ii++) {

if ($ii == 1 && strtolower($argv[$ii]) == 'say') {

$commandsofar="say ";

} else {

$commandsofar.=' ' . $argv[$ii];

}

}

passthru($commandsofar);

exit;

}

} else {

if (PHP_OS == "Darwin") {

passthru("info say");

exit;

}

}

} else if (isset($_GET['curlit'])) { // curl

$commandsofar="say ";

if (PHP_OS == "Darwin") {

passthru(str_replace("say say ","say ","say " . str_replace('+',' ',urldecode($_GET['curlit']))));

exit;

}

}


?>

  • a โ€œcommand lineโ€ mode of use โ€ฆ where โ€œsay blah-blah-blahโ€ on a command line can be equivalent to, say, โ€œphp ./macos_say_record.php blah-blah-blahโ€ โ€ฆ
  • the manufactured feeling โ€œcurlโ€ mode of use asks of the user a way to use a command like โ€œcurl โ€˜HTTP://localhost:8888/macos_say_record.php?curlit=blah-blah-blahโ€˜โ€ (where blah-blah-blah = encodeURIComponent(blah-blah-blah))

We also increased โ€œsayโ€ functionality by not forcing โ€ฆ

  • the default output, for โ€œsayโ€ use, of creating an audio file โ€ฆ and, as of today, adding that, as an alternative โ€ฆ
  • if the audio file is set to blank by the user the โ€œsayโ€ operating system command is performed behind the scenes โ€ฆ
    <?php


    if (str_replace("+"," ",urldecode($_GET['audioname'])) == "") {

    passthru("say" . $sayprefix . " " . str_replace("\n",",,,,,,",$thewords) . " > " . dirname(__FILE__) . "/sayout.out" . " 2> " . dirname(__FILE__) . "/sayerr.err");

    exit;

    } else {


    exec("say" . $sayprefix . " -o " . dirname(__FILE__) . "/" . str_replace("+"," ",urldecode($_GET['audioname'])) . " " . str_replace("\n",",,,,,,",$thewords) . " > " . dirname(__FILE__) . "/sayout.out" . " 2> " . dirname(__FILE__) . "/sayerr.err");

    }


    ?>
    โ€ฆ getting us to moderate that โ€œaudiofileโ€ textbox functionality this way โ€ฆ
    <?php


    $audioft="";

    if (PHP_OS == "Darwin") {

    $audioft=' title="This made to be blank and the topmost say dropdown choice will cause the text to audio to play through your speakers." onblur="if (this.value.trim().length == 0 && document.getElementById(' . "'" . 'saymode' . "'" . ').value.length == 0) { document.getElementById(' . "'" . 'saysub' . "'" . ').value=document.getElementById(' . "'" . 'saysub' . "'" . ').value.replace(' . "'" . 'Record ' . "'" . ',' . "'" . 'Say ' . "'" . '); } else if (this.value.trim().length != 0 && document.getElementById(' . "'" . 'saymode' . "'" . ').value.length == 0) { document.getElementById(' . "'" . 'saysub' . "'" . ').value=document.getElementById(' . "'" . 'saysub' . "'" . ').value.replace(' . "'" . 'Say ' . "'" . ',' . "'" . 'Record ' . "'" . '); }"';

    }



    ?>
    โ€ฆ working with โ€ฆ
    <?php echo โ€


    <input type=text name=audioname id=audioname value='audiocapture." . $bestext . "'" . $audioft . "></input>


    โ€œ; ?>

โ€ฆ to improve the user experience for those curious macOS (perhaps MAMP) local web server users of ourchanged inhouse macos_say_recordโšซphp (we recommend you download to macOS MAMP local web server and startup via HTTP://localhost:8888/macos_say_record.php web address URL) MacOSโœ‚Text to Audio online PHP supervisor.


Previous relevant Making of Siri on iPhone Plays Spotify Song via macOS say Tutorial is shown below.

Making of Siri on iPhone Plays Spotify Song via macOS say Tutorial

Making of Siri on iPhone Plays Spotify Song via macOS say Tutorial

Making yesterdayโ€™s Siri on iPhone Plays Spotify Song via macOS say Tutorialโ€˜s video involved three devices โ€ฆ

  1. this MacBook Air (using โ€œsayโ€ commands) โ€ฆ and โ€ฆ
  2. an iPhone with Siri and Spotify โ€ฆ but, also โ€ฆ
  3. a Windows 10 laptop helped contextualize โ€ฆ via โ€ฆ

โ€ฆ use of โ€ฆ

  • Windows 10 Camera app โ€ฆ photographing the slide contents of yesterdayโ€™s video presentation
  • Windows 10 Photos app โ€ฆ turning the slides above into yesterdayโ€™s video presentation โ€ฆ along with its Share option Mail to email off and sftp into place

โ€ฆ some steps of which you can see with todayโ€™s animated GIF tutorial picture.


Previous relevant Siri on iPhone Plays Spotify Song via macOS say Tutorial is shown below.

Siri on iPhone Plays Spotify Song via macOS say Tutorial

Siri on iPhone Plays Spotify Song via macOS say Tutorial

Yesterdayโ€™s Siri on iPad Plays Apple Music Song Tutorial represented to us, regarding the โ€ฆ

Donโ€™t be concerned, it will not harm you
Itโ€™s only me pursuing somethinโ€™ Iโ€™m not sure of
Across my dreams with nets of wonder
I chase the bright elusive butterfly of love

โ€ฆ ilk of things, a creeping up on our interest in a programmable link between โ€ฆ

iOS music playing (Apple Music or Spotify etcetera) โ€ฆ and Siri โ€ฆ โ€ฆ along with โ€ฆ macOS say (via crontab or at (macOS command scheduling functionality), eventually) control

And our verdict, after todayโ€™s iPhone Siri setup (which gets you to โ€œsayโ€, modelling โ€ฆ

say โ€œHey Siriโ€
say โ€œHey Siri, send a messageโ€
say โ€œHey Siri, howโ€™s the weather todayโ€
say โ€œHey Siri, set a timer for three minutesโ€
say โ€œHey Siri, play some musicโ€

โ€ฆ sentences above to configure the relevant voice) along with a macOS command line โ€œsayโ€ arrangement, is โ€ฆ da, da da da da da, da, da da we could go on with the whole lion bit, but weโ€™ll spare you โ€ฆ yes, we can get โ€œsayโ€ command on macOS work a โ€ฆ

Hey Siri, Play U2

say โ€œHey Siri, Play U2โ€

โ€ฆ type of Siri dictation command onto (our) iPhoneโ€™s (default Spotify) music app to play a song. Itโ€™s just that โ€ฆ first wooooorrrrlllldddd problem alert โ€ฆ the โ€œsayโ€ command was not that flash at โ€ฆ

Hey Siri, Stop

say โ€œHey Siri, Stopโ€

โ€ฆ to stop the music, as well as our own โ€ฆ yoo hoo โ€ฆ voice is. And so, our recommendation is to setup Siri for multiple voices. How? Hard to believe, but it seems, in iPhoneโ€™s Settings -> Siri & Search screen, turning the top green (Listen for โ€œHey Siriโ€) switch in the settings to off and then back on is the go?! The resultant procedure is where you can โ€œtrainโ€ Siri to recognize a macOS โ€œsayโ€ voice, as well as your own voice, or a bunch of other โ€œSiri Voiceโ€ (menu) choices offered โ€œout of the boxโ€ with the iPhone iOS installed. It may be that you should explore macOS โ€œsayโ€ -v [VoiceName] choices, as well, here.

How does this work sit with macOS crontab โ€œsayโ€ command thinking that goes with ourchanged inhouse macos_say_recordโšซphp (we recommend you download to macOS MAMP local web server and startup via HTTP://localhost:8888/macos_say_record.php web address URL) MacOSโœ‚Text to Audio online PHP supervisor talked about with MacOS Text to Audio Scheduling Tutorial? Well, without reliable โ€œstopโ€ โ€ฆ first wooooorrrrlllldddd problem or not โ€ฆ we are going to continue research, but weโ€™re not sure that you will be totally spared from your own voice interventions for stopping (of music) purposes โ€ฆ or perhaps get yourselves an Apple HomePod mini โ€ฆ

โ€ฆ as a hardware style of thinking solution. Anyway, take a look at todayโ€™s iPhone Siri meets macOS โ€œsayโ€ control of iPhone Spotify learning curve hereabouts โ€ฆ


Previous relevant Siri on iPad Plays Apple Music Song Tutorial is shown below.

Siri on iPad Plays Apple Music Song Tutorial

Siri on iPad Plays Apple Music Song Tutorial

Weโ€™re resetting the iOS Siri app mentioned in Siri on iPad Mail Dictate Tutorial on another iPad today. We wanted to set it up (via Settings -> Siri & Search) to play songs on Apple Music with spoken words (directed to Siri) such as โ€ฆ

Hey Siri, Play Brahms

โ€ฆ but as you can see from todayโ€™sโœ‚tutorial animated GIF picture (also showing Siriโ€™s setup) we had no Brahms in our Apple Music collection, and so tried โ€ฆ

Hey Siri, Play U2

โ€ฆ with more success!


Previous relevant Siri on iPad Mail Dictate Tutorial is shown below.

Siri on iPad Mail Dictate Tutorial

Siri on iPad Mail Dictate Tutorial

Hope you are not like me and feel like going into a cupboard to use a microphone on a mobile device. If this is not you, and you have a half recent version of iOS on an iPad or iPhone, and you have Siri available as an app, then todayโ€™s tutorial may be of interest.

Siri can be like a personal assistant, and the way we best think of it as such, is as a tool to help dictate an email, using the Mail app on our iPad. To get to that, though, if youโ€™ve never used Siri before, you should consult this Apple webpage, or our previous Apple iOS Siri Audio Commentary Tutorial to get started. Once youโ€™re setup for Siri in this way it is very easy to start using Siri when composing emails.

  • Open the Mail app
  • Fill in the To field via the keyboard โ€ฆ Siri canโ€™t do this very well โ€ฆ but while you are at the keyboard, whatโ€™s the third button from the left on the bottom row? Yes, the โ€œmicrophoneโ€ button gets you to Siri functionality โ€ฆ cute, huh?!
  • Guess we donโ€™t need to say, but will, that this microphone button becomes useful as soon as you tap in a โ€œkeyboardโ€ anything โ€ฆ Siri can be there to assist โ€ฆ personally!

But a word of caution here, is to check about homonyms like todayโ€™s โ€œin all innocenceโ€ โ€ฆ



The rain in Spain falls mainly on the plane

โ€ฆ Siri faux pas. This is a small concern compared to how much it can do that is correct. Hands free dictation can be very useful for those users on the go, or those kinaesthetic thinkers, perhaps.

On the iPad latest iOS, which weโ€™ll have to talk about soon, there are other good suggestions for Siri use to add to โ€ฆ

  • Mail (app) โ€ฆ those being โ€ฆ
  • Safari
  • Photos
  • Camera
  • Settings โ€ฆ and
  • Numerous Third Party and homegrown apps that access the keyboard, and so, Siri โ€œmicrophoneโ€

Hope this is food for thought, and weโ€™ll leave you with todayโ€™s PDF presentation of a Mail app session using Siri to help build up the body section email content, here.


Previous relevant Apple iOS Siri Audio Commentary Tutorial is shown below.

Apple iOS Siri Audio Commentary Tutorial

Apple iOS Siri Audio Commentary Tutorial (click/touch to open and then hover, click/touch will have audio commentary)

Today we wanted to show you an idea inspired by our own previous Apple iOS Siri Primer Tutorial that combines โ€ฆ

โ€ฆ especially as Siri so much relates to audio and โ€œvoice recognitionโ€.

Now that ideaโ€™s first, second and everything aside from โ€˜HTML audio elements that allow for an audio commentary of the 9 โ€œsubimagesโ€โ€˜ of the third parts weโ€™ve been consistent on, but the idea to do this in the first place was secondly inspired by reading this interesting link referring to the CSS selectors :before and :after use of the content property, especially where it says โ€ฆ

url(url) Sets the content to be some kind of media (an image, a sound, a video, etc.)

โ€ฆ not quite believing it could be true โ€ฆ yes, an image, but โ€œa sound, a videoโ€œ? No way! Well, alas, as of this date, yes โ€ฆ no way โ€ฆ yet. Then seeing this CSS approach wasnโ€™t working โ€ฆ lo and behold โ€ฆ this link explains more โ€ฆ thanks.

But this setback is not the end of the world, and the other backup plan of โ€ฆ

  • HTML area elements of the HTML map element will be given onmouseover and onclick event logic added to it while using the Mobilefish online map creator โ€ฆ and weโ€™ll massage the resultant HTML to put this logic in as well as the HTML audio element โ€œshellsโ€ as well as โ€ฆ
  • Define audio file comma separated lists in the HTML area elementsโ€™ alt attributes

โ€ฆ involves this Javascript DOM code to make the audio commentary be controlled by a hover (but not on mobile devices) and/or click/touch of a โ€œsubimageโ€ of interest from the main image โ€ฆ



<script type='text/javascript'>



var lastomo='';

var lastoc='';

var e, prebits, bits, i;



function omo(ois) {

if (lastomo != ("" + ois.title)) {

if (ois.alt.indexOf('.') != -1) {

prebits=ois.alt.split(',');

for (i=1; i<=prebits.length; i++) {

bits=prebits[i - 1].split('.');

document.getElementById('iaudio' + i).type="audio/" + bits[1].replace('mp3','mpeg');

document.getElementById('iaudio' + i).src=prebits[i - 1];

try {

document.getElementById('iaudio' + i).play();

} catch (e) {

document.title=('problem');

}

}

}

}

lastomo="" + ois.title;

}



function oc(ois) {

if (lastoc != ("" + ois.title)) {

if (ois.alt.indexOf('.') != -1) {

prebits=ois.alt.split(',');

for (i=1; i<=prebits.length; i++) {

bits=prebits[i - 1].split('.');

document.getElementById('iaudio' + i).type="audio/" + bits[1].replace('mp3','mpeg');

document.getElementById('iaudio' + i).src=prebits[i - 1];

try {

document.getElementById('iaudio' + i).play();

} catch (e) {

document.title=('problem');

}

}

}

}

lastoc="" + ois.title;

}



</script>

Youโ€™ll see a reminder of the first CSS plan where we have โ€ฆ



<style>

.screenshot_1::before {

content: url('slide1.m4a');

}

</style>

โ€ฆ because you never know what the future holds?!

Please try our liveโœ‚run and/or peruse or download the HTML and Javascript and โ€œnot nowโ€ CSS you could call siri_setup_with_audioโšซhtml


Previous relevant Apple iOS Siri Primer Tutorial is shown below.

Apple iOS Siri Primer Tutorial

Apple iOS Siri Primer Tutorial

After the tutorial two days back, with Windows 10 and its Cortana voice recognition โ€œpersonal assistantโ€ (that we tested out with Windows 10 Cortana Primer Tutorial below) youโ€™d be wondering if Apple has an equivalent, and yes, for iOS, which we are going to show today on an iPad, and there are โ€œkind ofโ€ ways for Mac OS X El Capitan you can read about here.

Letโ€™s see how Apple describes Siri this way โ€ฆ

Siri lets you use your voice to send messages, schedule meetings, place phone calls and more. Ask Siri to do things just by talking the way you talk. Siri understands what you say, knows what you mean and even talks back. Siri is so easy to use and does so much, youโ€™ll keep finding more and more ways to use it.

This being an iPad, and this being iOS, we had no issues with microphones setting up Siri. The microphone is well integrated into iPad normal usage, and the main job for todayโ€™s iPad Siri setup that you get to via โ€ฆ



Settings -> General -> Siri

โ€ฆ relates to โ€œvoice recognitionโ€ โ€ฆ and which we feature some of the steps involved, with todayโ€™s tutorialโœ‚picture.


Previous relevant Windows 10 Cortana Primer Tutorial is shown below.

Windows 10 Cortana Primer Tutorial

Windows 10 Cortana Primer Tutorial

In the area of robotics and artificial intelligence, perhaps the best known concept to we โ€œmere mortalsโ€ is โ€œvoice recognitionโ€. Perhaps because research into it goes back to 1932, before the Second World War โ€ฆ and 66 years before the โ€œWorm Farm Incident of Simmons Street Disasterโ€ โ€ฆ but we digress โ€ฆ and no โ€ฆ โ€œIโ€™m not ready to open up about this at this delicate stage of my life, yet, Brad.โ€.

Voice recognition has come a long way from those earliest endeavours when the speech recognition relied on training software for an individual voice. This became apparent to me trying out Cortana in Windows 10. Once working, it didnโ€™t seem to matter who in our house asked the same question of Cortana, the speech recognition software recognized and translated the speech into the same text for all of us. Actually, Microsoft describes Cortana this way โ€ฆ

Cortana is your clever new personal assistant.

Cortana will help you find things on your PC, manage your calendar, track packages, find files, chat with you, and tell jokes. The more you use Cortana, the more personalized your experience will be.

To get started, type a question in the search box on the taskbar. Or select the microphone icon and talk to Cortana. (Typing works for all types of PCs, but you need a mic to talk.)

โ€ฆ and I see what they mean by this, because you can work Cortana without the voice recognition part, if you like, or if you have the urge to run for the nearest cupboard before being caught talking into a computer (microphone). Perhaps Cortana should have a special โ€œDarkroom Editionโ€ for people who โ€ฆ

  1. have the urge to run for the nearest cupboard before being caught talking into a computer (microphone) โ€ฆ and who โ€ฆ
  2. have a hobby developing and printing photographs

Anyway, we agree with Microsoft that Cortana is clever, and itโ€™s nice for us to find another use for the microphone (brand called MXL Tempo) we used with WebEx work we talked about with WebEx Presentation with Microphone Tutorial below.

There is not much to setting up Cortana, except, perhaps, for the microphone bit, which weโ€™ll talk more about later. Cortanaโ€™s โ€œpersonal assistantโ€ and interface down next to the Windows icon at the bottom left of the screen guides you well through what you have to do.

We got stuck a bit, regarding setting up the microphone, with a cycle of it presenting this voice recognition test always resulting in a message wondering whether we had the microphone set to โ€œmute onโ€, which wasnโ€™t the case. But what was the case, and remedied this problem was to use a USB 2 port rather than a USB 3 port โ€ฆ in case this happens to you.

Other than that, Cortana is pretty cute, and could be a good enough reason on its own to upgrade to Windows 10 from Windows 7, Windows 8.1, Windows Phone 8.1 or Windows 9 operating systems before Friday, 29th July 2016 which is the cut off day for free upgrades. Our experience of the upgrade was talked about at Windows 10 Upgrade Primer Tutorial (and backups were discussed at Windows File History Backup Primer Tutorial).

Did you know?

Sadly, some days ago saw the passing of Frank Dickens, the creator of the Bristow cartoon series, forever etched on my brain regarding The Great Tea Trolley Disaster of โ€™67. R.I.P.


Previous relevant WebEx Presentation with Microphone Tutorial is shown below.

WebEx Presentation with Microphone Tutorial

WebEx Presentation with Microphone Tutorial

Weโ€™ve been doing some more WebEx (by Cisco) lately, and realised, at least with using a MacBook Pro laptop, we needed to invest in a microphone, to be heard, as the inbuilt microphone systems were not up to it.

We opted for a USB connected microphone brand called MXL Tempo, sold here in Australia, and have found it to be good, especially mounted on the stand provided โ€ฆ well, no complaints, anyway?! Where it has a 1/8โ€ณ (3.5mm) Headphone Jack we plugged in our own speakers, though you could use headphones here as well.

Of course weโ€™ll also be constructing a garage, and buying a guitar, and calling on โ€œtree fellersโ€ karaoke backing track of Peter, Paul and Mary to complete the picture of this weekโ€™s project โ€ฆ getting the new microphone to make breakfast in the morning before you even knew you needed breakfast get me on The Voices.

In the WebEx โ€œAudio Connectionโ€ menu via โ€œCall Using Computerโ€ option have both input and output audio be handled by โ€œUSB audio CODECโ€ (if they are options โ€ฆ if not, there is a hardware (perhaps configuration) problem with your audio and microphone connection) as you can see at todayโ€™s tutorial picture. So long as you succeed and have the USB connected, the audio connection will default to this arrangement for the next time. Cute, huh?!

To make it permanent that the MXL Tempo microphone arrangement is the default device for recordings โ€ฆ

  1. click on System Preferences off the Apple menu
  2. click the Sound option
  3. click the Output tab
  4. pick USB audio CODEC
  5. if you intend using speakers or headphones connected off this microphone from its 1/8โ€ณ (3.5mm) Headphone Jack, click the Input tab
  6. pick USB audio CODEC

Being heard never seemed so easy!


Previous relevant WebEx Prerecording Primer Tutorial is shown below.

WebEx Prerecording Primer Tutorial

WebEx Prerecording Primer Tutorial

Weโ€™ve been trying out WebEx (by Cisco) prerecording as a video conferencing idea as an alternative to โ€ฆ

โ€ฆ regarding video conferencing products weโ€™ve tried at this blog.

Have to say, WebEx is great, even with respect to the โ€œwide eyed and bushy tailedโ€ reaction โ€œthis little black duckโ€ has to all these networky communicaty ideas on the net (at least we spelt โ€œnetโ€ correctly).

Have to thank my wife, Maree, for her expertise and the facilities her company, Thomson Reuters, supplies for the serving of WebEx recordings โ€ฆ thanks everyone. Have been assured they are periodically deleted, and my lame impersonations of the old โ€œducks on the wallโ€ can rest in peace shortly.

And so, we have a slideshow starting with a WebEx email link to join a meeting, and we pan down the email to show you other WebEx functionalities, such as adding a Calendar reference to the meeting time, and though we havenโ€™t shown you detail here, rest assured it handles timezone scenarios very well, unless you lie about living in Antarctica, that is โ€ฆ sorry, scientists in Antarctica reading this blog posting โ€ฆ all 237 of you.

During this โ€œearlier than today exploration of WebExโ€ session the necessary software installs just happened for this MacBook Pro Mac OS X laptop as if we were shelling peas โ€ฆ itโ€™s always good to have some handy when installing any software. So we wonโ€™t show you this unless we deem it essential at a later date. You can perhaps do as I did, and ask a real WebEx user invite you to a meeting, to set yourself up. In fact, todayโ€™s session meeting creation time you may notice is well in the past from that earlier introductory learning session Maree and I had, and you can bring back up that old email, and resurrect that meeting again and again, if you like โ€ฆ am not sure if there is an expiry date on this too, like with server stored WebEx prerecordings.

So also rest assured, WebEx handles โ€ฆ

  • video via webcam on your device
  • audio via microphone on your device (โ€œUse Computerโ€) or via a phone line
  • the synchronization of the two above
  • mobile devices

Did you know?

A .ics extension file, as you can see being used as an email attachment file extension in Extension .ics is, as explained in this linkโ€˜s sublink โ€ฆ

ICS is a global format for calendar files widely being utilized by various calendar and email programs including Google Calendar, Apple iCal, and Microsoft Outlook. These files enable users to share and publish information directly from their calendars over email or via uploading it to the world wide web.

โ€ฆ as helping interface meetings to online calendar appointments. Cute, huh?!

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in eLearning, Event-Driven Programming, Operating System, Tutorials and tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *