$OpenBSD: patch-src_api_python_speechd_config_config_py_in,v 1.1 2015/04/06 12:33:20 ajacoutot Exp $
--- src/api/python/speechd_config/config.py.in.orig	Fri Mar 20 04:07:41 2015
+++ src/api/python/speechd_config/config.py.in	Mon Apr  6 14:23:18 2015
@@ -193,6 +193,15 @@ class Options(object):
             'command_line' : ('', '--test-pulse'),
             },
 
+        'test_libao':
+            {
+            'descr' : "Test libao audio",
+            'doc' : None,
+            'type' : bool,
+            'default' : False,
+            'command_line' : ('', '--test-libao'),
+            },
+
         'use_espeak_synthesis':
             {
             'descr' : _("Use espeak to synthesize messages"),
@@ -440,6 +449,11 @@ is not installed."""))
         report(_("Testing PULSE sound output"))
         return self.audio_try_play(type='pulse')
 
+    def test_libao(self):
+        """Test libao sound output"""
+        report("Testing libao sound output")
+        return self.audio_try_play(type='libao')
+
     def diagnostics(self, speechd_running = True, output_modules=[], audio_output=[]):
 
         """Perform a complete diagnostics"""
@@ -491,6 +505,10 @@ what is wrong)"""), True):
             if self.test_pulse():
                 working_audio += ["pulse"]
 
+        if decide_to_test('libao', "libao sound system", audio_output): 
+            if self.test_libao():
+                working_audio += ["libao"]
+
         report(_("Testing whether Python Speech Dispatcher library is in path and importable"))
         python_speechd_working = test.python_speechd_in_path()
         
@@ -736,7 +754,7 @@ Do you want to keep it?"""), False)
 
         self.default_audio_method = question_with_suggested_answers(
             "Default audio output method",
-            "pulse",
+            "libao",
             ["pulse", "libao", "alsa", "oss", "pulse,alsa"])
 
         self.default_speech_rate = question(
@@ -899,6 +917,9 @@ def main():
 
     elif options.test_pulse:
         test.audio_try_play(type='pulse')
+
+    elif options.test_libao:
+        test.audio_try_play(type='libao')
 
     elif options.diagnostics:
         ret = test.diagnostics()
