parent
2ce4c26f98
commit
e33b716c32
@ -0,0 +1,18 @@ |
||||
# default translation file |
||||
# TODO |
||||
# make it truly default rather than dedicated to ReadingNotes |
||||
# if dedicate Group translation file exist use it else us this one |
||||
s/^text=// |
||||
s/%25/%/g |
||||
s/\[\[.*|// |
||||
s/\[\[#[a-zA-Z\+]\]\]// |
||||
s/\(:.*:\)// |
||||
s/^>>.*// |
||||
#s/Pre-reading model// |
||||
#s/^Draw a schema.*// |
||||
s/^!\(.*\)/<voice gender="female">\1<\/voice>/ |
||||
#s/- ISBN [a-zA-Z0-9]\+ // |
||||
s/$/./ |
||||
s/'''\(.*\)'''/<emphasis>\1<\/emphasis>/ |
||||
s/!\+// |
||||
s/^*\+// |
@ -0,0 +1,30 @@ |
||||
#! /usr/bin/env bash |
||||
|
||||
# usage: generate ogg audio files from PmWiki content |
||||
# see http://fabien.benetou.fr/MemoryRecalls/ImprovingPIM#AudioPIM for details including how to display the generated file |
||||
|
||||
# TODO |
||||
# check espeak and oggenc present in the path (else suggest installing them) |
||||
# propose to create the audio dir if not present |
||||
# XXX |
||||
# doing so for the *whole* wiki takes time and might not be that useful |
||||
# consider adding a filter to restrict only on a group e.g. ReadingNotes |
||||
|
||||
|
||||
WIKIPATH=. |
||||
|
||||
if [ $# -gt 0 ] |
||||
then |
||||
WIKIPATH=$1 |
||||
fi |
||||
|
||||
DEFAULT_TR=~/bin/pmwiki-to-ssml-default |
||||
|
||||
for P in `ls $WIKIPATH -IPmWiki.* -I*RecentChanges -Itotalcounter.stat -I*,del-*`; |
||||
do |
||||
GROUP=`echo $P | sed "s/.*\/\(.*\)\..*$/\1/"` |
||||
# test in ssml translation for this group exist else default |
||||
grep ^text= $WIKIPATH/$P | sed "s/%0a/\\n/g" | sed -f $DEFAULT_TR > $WIKIPATH/../pub/audio/$P.ssml |
||||
espeak -m -f $P.ssml -w $WIKIPATH/../pub/audio/$P.wav |
||||
oggenc $WIKIPATH/../pub/audio/$P.wav |
||||
done |
Loading…
Reference in new issue