File: README.audio

package info (click to toggle)
gretl 2016d-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 48,620 kB
  • ctags: 22,779
  • sloc: ansic: 345,830; sh: 4,648; makefile: 2,712; xml: 570; perl: 364
file content (160 lines) | stat: -rw-r--r-- 5,580 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
What's with audio and gretl?
===========================

Introduction
============

This note describes what is going on with audio in gretl, and also
what you need in terms of additional software to make use of this
facility.

What and Why?
=============

I teach a course in Economic Data Analysis, using gretl, and in the
Fall of 2004 I will have a blind student in my class.  So as of summer
2004 I am working to try to make gretl more friendly to those without
sight.

There are two aspects to this, so far: audio graphs, and the speaking
of the content of certain gretl windows.

As for audio graphs, the idea is that we sighted people can get a
useful initial handle on a data set by looking at various time-series
graphs or X-Y scatter-plots, as appropriate, and I'm trying to work
out an audio counterpart for the non-sighted.

The basic idea is that we represent the x-axis variable by the passage
of time (even if it's not actually time on the x-axis, as it is in a
time-series plot), and the magnitude(s) on the y-axis by a musical
note whose pitch corresponds to the magnitude (normalized to a
reasonable auditory range).  This is implemented via a MIDI file. Up
to two y-axis magnitudes can be represented by this sort of "data
sonification" (as it is called in the literature), separated by timbre
(choice of MIDI "instrument" or patch file) and by stereo channel.

As regards the speaking of window content, blind people have various
resources available already, which do "text to speech" (TTS) on window
contents.  But after a little experimentation it became clear to me
that this is not necessarily very useful.  A tabular presentation of
output, which is quite clear to the eye, may be hopelessly confusing
when "read out" on a strict left-to-right, top-to-bottom basis.
("What was the meaning of this column?  Which column are we in,
anyway?")  

I have therefore taken some time to construct specifically auditory
representations of the content of some gretl windows (so far, only a
few).  These representations (a) skip some detail which cannot be
given perspicuously in auditory mode, while (b) offering some
(hopefully) helpful redundancy in respect of the basics. 

Dependencies
============

The gretl audio facilities depend on (a) speech synthesis and (b) a
MIDI player.

Speech synthesis: This can be supported either by the flite (Festival
Lite) library on Linux and other unices, or the Microsoft Speech API
(SAPI) on Windows.  I have experimented with both of these (for the MS
SAPI I used Windows XP "Professional").  

For flite, see:

  http://www.speech.cs.cmu.edu/flite/

and for the Windows SAPI, see:

  http://www.microsoft.com/speech/download/sdk51/

MIDI player: On Linux this is typically timidity, 

  http://timidity.sourceforge.net/

and on Windows it is typically Winamp.  On Linux you can choose a MIDI
player (and its options) using an environment variable (see below).
On Windows the MIDI player is whatever is offered by the Windows
ShellExecute() function as applied to a MIDI file.

How To
======

* If you are using gretl on Windows, audio support is built in at the
gretl end; you "just" need to ensure that your Windows installation
supports TTS and MIDI playing.

* If you're using gretl on Linux, you should compile gretl from source
yourself to get audio support (first installing flite as mentioned
above).  The following two configure options are relevant:

  --with-audio=yes
  --with-flite-prefix=<whatever>

The first of these options is required to get gretl interested in
supporting audio.  The second may be needed if flite is installed in a
location where it will not readily be found.  On my own system, I give

  --with-flite-prefix=/opt/speech

because I chose to install the flite libraries and headers under
/opt/speech.

Regardless of OS, gretl's audio support resides in a dynamically
loaded "plugin" (either audio.so or audio.dll).

Activating audio in gretl
=========================

Assuming gretl was built with audio support, here are the controls:

(1) When a graph is displayed, with focus in the graph window press
    the "a" (for audio) key.  You should get a brief
    speech-synthesized description followed by a MIDI play-through of
    the graph.

(2) When a gretl text window is displayed, again press the "a" key to
    get an audio representation.  Press "x" to stop the read-out.  In
    some cases the read-out will be a simple TTS rendering of the
    visible content of the window, which may or may not be very useful
    to a blind user.  In the following cases (to be extended) it will
    be a purpose-designed auditory rendition of the window's content:

    - Summary statistics, for a variable or set of variables
    - Correlation matrix for a set of variables
    - OLS models
    - Confidence intervals for regression coefficients
    - Covariance matrix for regression coefficients

Under Linux or other unices, you can control the MIDI player used for
graphs via the environment variable GRETL_MIDI_PLAYER, which can be
assigned the name of a player program plus zero or more options.  The
default is equivalent to

  GRETL_MIDI_PLAYER="timidity -A500"

where the "-A500" option raises the volume a bit relative to the
default (which is a bit too quiet on my system).  Personally, I use

  GRETL_MIDI_PLAYER="timidity -A500 -ig"

to get timidity to present its GTK user interface (see the timidity
man-page for details).  You might wish to use

  GRETL_MIDI_PLAYER="xmms"

if you have the midi plugin for xmms.

Allin Cottrell
Wake Forest university
May 2004