My Dinky Note

Aditya Arie Nugraha's weblog

Festival Can’t Open /dev/dsp

with 38 comments

I installed Festival in my Ubuntu 8.10 and when I was trying to use it to synthesize text, I got this error:

Linux: can't open /dev/dsp

Fortunately, I found the answer here. To solve this problem just write this .festivalrc in your home directory.

(Parameter.set 'Audio_Command "aplay -q -c 1 -t raw -f s16 -r $SR $FILE")
(Parameter.set 'Audio_Method 'Audio_Command)

Advertisements

Written by arie

December 20, 2008 at 12:57 am

Posted in Hobbies & Interests

Tagged with ,

38 Responses

Subscribe to comments with RSS.

  1. Short but very good post. I have spent quite same time looking for this solution.

    Thanks a lot,

    Suomi

    Suomi

    January 29, 2009 at 5:33 am

  2. Perfect. Thanks muchly!

    Tass

    February 23, 2009 at 8:40 pm

  3. I love your site!

    _____________________
    Experiencing a slow PC recently? Fix it now!

    Michael Tim

    March 1, 2009 at 12:03 am

  4. Thank you so much. That totally worked for me on Ubuntu 8.04.

    Ken Weiner

    March 28, 2009 at 3:46 am

  5. thanks!

    jones

    April 20, 2009 at 7:19 am

  6. thank you so much

    fabio

    August 24, 2009 at 11:01 pm

  7. Thank you,

    it works

    Hugo

    August 31, 2009 at 2:24 pm

  8. works gret, thx a lot!

    hank

    November 12, 2009 at 9:16 pm

  9. Worked like a charm on Ubuntu 9.10. Thanks!

    Jeroen Van Goey

    November 26, 2009 at 11:03 pm

  10. good, however for use please add ‘ after ‘Audio_Command

    brito

    December 14, 2009 at 7:16 am

  11. Thanks. This works fine for me in Fedora 10 also

    Abhilash

    December 14, 2009 at 1:55 pm

  12. I’m running Karmic here; for whatever reason I needed this too!

    Thanks for making it available.

    Brian Fahrlander

    December 16, 2009 at 7:32 am

  13. works great thanks

    jeff

    April 24, 2010 at 9:38 pm

  14. Werkt ook in de laatste Debian. Bedankt !

    eerstkoffie

    May 1, 2010 at 6:44 am

  15. Got this response ..

    sh: aplay: command not found

    any ideas on how to proceed? Thanks

    killben

    June 3, 2010 at 8:01 pm

    • I think you should install alsa-utils.

      aptitude install alsa-utils

      *I assumed you used Debian-based operating system. 🙂

      arie

      June 3, 2010 at 10:24 pm

      • Thanks. But I have a query!

        I am using Cent OS.

        Will it work for Cent OS?

        killben

        June 4, 2010 at 1:48 pm

  16. Thank you for :

    (Parameter.set ‘Audio_Command “aplay -q -c 1 -t raw -f s16 -r $SR $FILE”)
    (Parameter.set ‘Audio_Method ‘Audio_Command)

    it solved my problème.

    i installed all alsa*.

    nabex

    June 9, 2010 at 5:42 am

  17. It actually worked.
    Thank you so much.

    Lys

    July 10, 2010 at 12:48 pm

  18. If you use sox:

    (Parameter.set ‘Audio_Command “play –no-show-progress -V1 –type raw -2 -s –rate $SR $FILE”)
    (Parameter.set ‘Audio_Method ‘Audio_Command)

    Don`t forget install sox and sox “sndfile” format

    Roman V. Nikolaev

    July 13, 2010 at 12:33 am

  19. Thank you, it worked for me.

    Junaid

    July 13, 2010 at 8:02 pm

  20. Granks!! Worked perfect for Debian Lenny! For russion speak i used this howto:
    http://habrahabr.ru/blogs/linux/60977/

    ASLok

    July 15, 2010 at 5:18 pm

  21. Thanks very much.
    This solution worked fine to me. I added this to my personal web page: http://joan.bsd.lt/article/veu-computeritzada-text-speech

    best regards,

    joan

    joan

    July 22, 2010 at 5:26 am

  22. I solved simply doing: sudo ln -s /dev/dsp1 /dev/dsp
    cause my audio device was in /dev/dsp1

    nimiq

    August 5, 2010 at 5:05 am

  23. great!!!
    Worked on me too

    Tharindu

    September 29, 2010 at 4:08 pm

  24. Dude, this rocks. The only other solution I could find was running through different alsa packages and trying to find “some sort of conflict”. Honestly I think the solution was bogus. You rock!

    BM

    May 29, 2011 at 12:38 pm

  25. Thanx, that’s works for me 🙂

    Alexandr

    September 27, 2011 at 1:40 am

  26. Thank you, worked. Short and sweet. 🙂

    Gerry

    December 2, 2011 at 1:29 pm

  27. thanks for the help.
    saved me alot of hassle.

    Ori Tari

    December 4, 2011 at 11:27 pm

  28. where can i write two lines

    amr mohsen

    December 26, 2011 at 4:11 pm

  29. I didn’t understand the solution so I read something here: https://wiki.archlinux.org/index.php/Festival

    What I did was
    1. Create the file .festivalrc in my home directory as I didn’t have that file.
    2. Open that file and add two lines:
    (Parameter.set ‘Audio_Method ‘Audio_Command)
    (Parameter.set ‘Audio_Command “aplay -q -c 1 -t raw -f s16 -r $SR $FILE”)
    3. Save file and try
    echo “Hello world” | festival –tts

    Anon

    February 12, 2012 at 12:29 am

  30. hasn’t worked for me despite following the instructions!

    David Okwii

    September 11, 2012 at 5:46 pm

  31. It worked when i added the above to the file at /usr/share/festival/festival.scm

    David Okwii

    September 11, 2012 at 5:52 pm

  32. works on openSuse 12.3 like a charm Thx

    Subtex

    June 3, 2013 at 8:05 pm

  33. […] a thank-you note to Aditya Arie Nugraha, who had the foresight to paste the fix into a blog post way back in 2008. In […]

  34. Still worx, although the description is quite short. I finally figured out that I need to create a file in my home-dir, name it .festivalrc with the content…

    maria

    April 11, 2014 at 6:39 pm

  35. this very cool
    thanks it is works on opensuse 13.2

    veru

    June 11, 2015 at 9:17 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: