From c573b04bd7ff79b99b4ffe87a66a8e25dea983af Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Thu, 28 Jul 2011 19:37:04 +0200 Subject: [PATCH] support for audio files when they are present --- pmwiki_recipes/pim_functions.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pmwiki_recipes/pim_functions.php b/pmwiki_recipes/pim_functions.php index 1d5be72..a3ea778 100644 --- a/pmwiki_recipes/pim_functions.php +++ b/pmwiki_recipes/pim_functions.php @@ -165,6 +165,20 @@ textFont(font); $older_gnuplot_version = "
\"/pub/visualization/edits_per_page/{$pagename}.png\"/
(visualization details).

"; } +// generated via e.g. +// P=ReadingNotes.TurtlesTermitesAndTrafficJams; grep ^text= $P | sed "s/%0a/\\n/g" | sed "s/[^a-zA-Z]/ /g" > $P.txt && espeak -f $P.txt -w $P.wav && oggenc $P.wav && rm $P.wav +// note that the output could be improved by better parsing and exploring SSML/HTML support +// details on the HTML markup +// https://developer.mozilla.org/en/HTML/Element/audio +// http://www.w3.org/TR/html5/video.html#attr-media-controls +function DisplayAudio($pagename){ + global $ScriptUrl, $PubDir, $FarmD; + $audiofile = $FarmD."/pub/audio/".$pagename.".ogg"; + $audiourl = $ScriptUrl."/pub/audio/".$pagename.".ogg"; + if (file_exists($audiofile)) + print "
"; + print "Download the audio file (ogg) to play later."; +} //display images with transparancy invertionnaly proportional to last time of update // http://fabien.benetou.fr/MemoryRecalls/ImprovingPIM#VisualDecayOfInformation