File: na_play.1

package info (click to toggle)
speech-tools 1%3A2.5.0-13
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 9,992 kB
  • sloc: cpp: 67,350; ansic: 12,174; sh: 4,055; java: 3,748; makefile: 1,112; lisp: 711; perl: 396; awk: 85; xml: 9
file content (119 lines) | stat: -rw-r--r-- 4,056 bytes parent folder | download | duplicates (8)
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
.Dd April 4, 2001
.Dt NA_PLAY 1
.Os "Edinburgh Speech Tools"
.Sh NAME
.Nm na_record
.Nd play waveform files on audio device
.Sh SYNOPSIS
.Nm na_play
.Op Fl h
.Op Fl itype Ar type
.Op Fl n Ar channels
.Op Fl f Ar sample rate
.Op Fl ibo Ar byteorder
.Op Fl iswap
.Op Fl istype Ar type
.Op Fl c Ar channel
.Op Fl start Ar time
.Op Fl end Ar time
.Op Fl from Ar sample
.Op Fl to Ar sample
.Op Fl p Ar protocol
.Op Fl command Ar command
.Op Fl basic
.Op Fl quality Ar high | low
.Op Fl server Ar host
.Op Fl scale Ar scale
.Op Fl v
.Op Fl wait
.Ar input files ...
.Sh DESCRIPTION
.Nm na_play
plays digital audio data to the system's audio input device from the specified
file(s).  It supports a variety of file formats and native audio devices.
.Pp
The following option flags are recognized:
.Pp
.Bl -tag -width 4n -offset indent -compact
.It Fl h
Prints a short summary of usage to standard output.
.It Fl itype Ar type
Input file type.  Usually, the input type can be determined from the file's
headers, so this option is not required except for raw (unheadered) data.
Supported types are currently: nist, est, esps, snd, riff, aiff, audlab, raw,
ascii.
.It Fl n Ar channels
Number of channels, in an unheadered input file.  Again, this can usually be
determined from the headers.  Default is 1.
.It Fl f Ar sampling rate
Sampling rate, for an unheadered input file.  Default is 16000.
.It Fl ibo Ar byte order
Byte order, for an unheadered input file.  Default is system byte order.
Recognized values are: MSB, LSB, native, nonnative.
.It Fl iswap
Swap bytes in an unheadered input file.
.It Fl istype Ar type
Sample type for an unheadered input file.  Recognized values are: short, mulaw,
byte, ascii.
.It Fl c Ar channel
Select a single channel (starting at 0) for playback.  This option plays only
the specified channel and discards all others.
.It Fl start Ar time
Select a subsection of the file, starting at this time (specified in seconds).
.It Fl end Ar time
Select a subsection of the file, ending at this time (specified in seconds).
.It Fl from Ar sample
Select a subsection of the file, starting at this offset (specified in number of
samples).
.It Fl to Ar sample
Select a subsection of the file, ending at this offset (specified in number of
samples).
.It Fl p Ar protocol
Use the specified audio device protocol.  The list of supported types varies
between platforms, and can be obtained using the
.Fl h
flag.
.It Fl command Ar command
If the "audio_command" protocol is specified, this argument must be given to
select the command used to play the waveform.  A temporary file is created and
passed in the environment variable FILE.  The sample rate is passed in the
environment varialbe SR.
.It Fl basic
Treat unheadered input files as 8kHz mu-law data (i.e. audio/basic MIME type)
.It Fl quality Ar high | low
Select the quality of output. "high" will ensure that proper resampling is used.
"low" means to play as fast as possible with a minimum of processor time.
.It Fl server Ar host
Specifies the host to play sound on, when using a network-aware audio protocol
(such as NAS)
.It Fl scale Ar scale
Change the gain (volume) of the signal.  The argument is a number relative to
1.0, which is the default.
.It Fl v
Be verbose (i.e. print file names when playing)
.It Fl wait
Pause for a keystroke between each file.
.El
.Sh ENVIRONMENT
.Bl -tag -width 4n -offset indent -compact
.It Ev NA_PLAY_PROTOCOL
Audio protocol to use (as in the
.Fl p
flag)
.It Ev NA_PLAY_COMMAND
Command used to play audio when using the audio_command protocol.
.It Ev NA_PLAY_HOST
Host to play audio on when using a network audio protocol.
.It Ev NA_PLAY_QUALITY
Playback quality (low or high)
.El
.Sh EXAMPLES
To play the section of foo.wav from 1.5 to 3.2 seconds:
.Dl "$ na_play -start 1.5 -end 3.2 foo.wav"
To play samples 3600 to 42000 of channel 1 of bar.wav:
.Dl "$ na_play -from 3600 -to 4200 -c 1 foo.wav"
.Sh BUGS
The usage information isn't entirely correct. The audio_command protocol
generates temporary files insecurely.
.Sh SEE ALSO
.Xr na_record 1