<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: festival code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Wed, 23 Jul 2008 16:25:57 GMT</pubDate>
    <description>DZone Snippets: festival code</description>
    <item>
      <title>Using TTS to read a text file with Asterisk</title>
      <link>http://snippets.dzone.com/posts/show/5531</link>
      <description>This configuration reads a text file (limiting it to 130 characters or less) and then speaks the message to the caller.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;exten =&gt; 3200,1,ReadFile(test=/tmp/test.txt,130)&lt;br /&gt;exten =&gt; 3200,n,Festival(${test})&lt;br /&gt;exten =&gt; 3200,n,Hangup&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 21 May 2008 12:02:44 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5531</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
    <item>
      <title>Using text-to-speech in Asterisk</title>
      <link>http://snippets.dzone.com/posts/show/5530</link>
      <description>Use instructions to get Asterisk to use text-to-speech. Tested on Ubuntu 8.04 Sever.&lt;br /&gt;&lt;br /&gt;*packages required*&lt;br /&gt;festival&lt;br /&gt;festvox-rablp16k&lt;br /&gt;&lt;br /&gt;file: extensions.conf&lt;br /&gt;&lt;code&gt;detail&lt;br /&gt;exten =&gt; 3250,1,Answer()&lt;br /&gt;exten =&gt; 3250,n,Festival('hello world')&lt;br /&gt;exten =&gt; 3250,n,Hangup&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;From the command-line type 'festival --server'&lt;br /&gt;Then restart Asterisk&lt;br /&gt;</description>
      <pubDate>Wed, 21 May 2008 10:50:24 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5530</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
    <item>
      <title>Festival TTS for Ruby</title>
      <link>http://snippets.dzone.com/posts/show/5234</link>
      <description>This text-to-speech engine uses Ruby and festival. Listen to the output as an &lt;a href="http://tinyurl.com/2knm39"&gt;mp3 sample&lt;/a&gt; [twittergram.com]&lt;br /&gt;&lt;br /&gt;Prerequisites:&lt;br /&gt;  sudo apt-get install festival lame&lt;br /&gt;  sudo gem install festivaltts4r&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;require "rubygems"&lt;br /&gt;require "festivaltts4r"&lt;br /&gt;				&lt;br /&gt;"I'm talking".to_speech&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Reference: &lt;a href="http://festivaltts4r.rubyforge.org/"&gt;Festival TTS for Ruby - Make your Ruby Strings talk!&lt;/a&gt; [rubyforge.org]</description>
      <pubDate>Sat, 15 Mar 2008 02:55:23 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5234</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
    <item>
      <title>Digg/RSS Reader</title>
      <link>http://snippets.dzone.com/posts/show/1900</link>
      <description>Grabs the RSS-feed from digg.com and reads it out&lt;br /&gt;loud using festival.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;# Copyright (c) 2005 Davor Babic &lt;davorb@gmail.com&gt;&lt;br /&gt;# All rights reserved.&lt;br /&gt;# Usage of the works is permitted provided that this&lt;br /&gt;# instrument is retained with the works, so that any&lt;br /&gt;# entity that uses the works is notified of this&lt;br /&gt;# instrument.&lt;br /&gt;# DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.&lt;br /&gt;&lt;br /&gt;url="http://digg.com/rss/index.xml"&lt;br /&gt;&lt;br /&gt;echo "Parsing RSS..."&lt;br /&gt;curl --silent "$url" | grep -E '(title&gt;|description&gt;)' | \&lt;br /&gt;        sed -n '4,$p' | \&lt;br /&gt;	sed -e 's/&lt;title&gt;//' -e 's/&lt;\/title&gt;//' -e 's/&lt;description&gt;/  /' \&lt;br /&gt;	    -e 's/&lt;\/description&gt;//' | head -5 &gt; digg &lt;br /&gt;echo "Reading..."&lt;br /&gt;festival --tts digg&lt;br /&gt;rm -rf ./digg&lt;br /&gt;echo "Done."&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 12 Apr 2006 04:18:53 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1900</guid>
      <author>davor (Davor Babic)</author>
    </item>
  </channel>
</rss>
