7
7
msgstr ""
8
8
"Project-Id-Version : Python 3.11\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
- "POT-Creation-Date : 2022-09-24 00:21 +0000\n "
10
+ "POT-Creation-Date : 2023-06-01 00:43 +0000\n "
11
11
"PO-Revision-Date : 2018-05-23 16:15+0000\n "
12
12
"
Last-Translator :
Adrian Liaw <[email protected] >\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -28,66 +28,65 @@ msgstr "**原始碼:**\\ :source:`Lib/wave.py`"
28
28
29
29
#: ../../library/wave.rst:14
30
30
msgid ""
31
- "The :mod:`wave` module provides a convenient interface to the WAV sound "
32
- "format. Only files using ``WAVE_FORMAT_PCM`` are supported. Note that this "
33
- "does not include files using ``WAVE_FORMAT_EXTENSIBLE`` even if the "
34
- "subformat is PCM."
31
+ "The :mod:`wave` module provides a convenient interface to the Waveform Audio "
32
+ "\" WAVE \" (or \" WAV \" ) file format. Only files using ``WAVE_FORMAT_PCM`` are "
33
+ "supported. Note that this does not include files using "
34
+ "``WAVE_FORMAT_EXTENSIBLE`` even if the subformat is PCM."
35
35
msgstr ""
36
36
37
- #: ../../library/wave.rst:18
37
+ #: ../../library/wave.rst:19
38
38
msgid "The :mod:`wave` module defines the following function and exception:"
39
39
msgstr ""
40
40
41
- #: ../../library/wave.rst:23
41
+ #: ../../library/wave.rst:24
42
42
msgid ""
43
43
"If *file* is a string, open the file by that name, otherwise treat it as a "
44
44
"file-like object. *mode* can be:"
45
45
msgstr ""
46
46
47
- #: ../../library/wave.rst:27
47
+ #: ../../library/wave.rst:28
48
48
msgid "``'rb'``"
49
49
msgstr "``'rb'``"
50
50
51
- #: ../../library/wave.rst:27
51
+ #: ../../library/wave.rst:28
52
52
msgid "Read only mode."
53
53
msgstr ""
54
54
55
- #: ../../library/wave.rst:30
55
+ #: ../../library/wave.rst:31
56
56
msgid "``'wb'``"
57
57
msgstr "``'wb'``"
58
58
59
- #: ../../library/wave.rst:30
59
+ #: ../../library/wave.rst:31
60
60
msgid "Write only mode."
61
61
msgstr ""
62
62
63
- #: ../../library/wave.rst:32
63
+ #: ../../library/wave.rst:33
64
64
msgid "Note that it does not allow read/write WAV files."
65
65
msgstr ""
66
66
67
- #: ../../library/wave.rst:34
67
+ #: ../../library/wave.rst:35
68
68
msgid ""
69
69
"A *mode* of ``'rb'`` returns a :class:`Wave_read` object, while a *mode* of "
70
70
"``'wb'`` returns a :class:`Wave_write` object. If *mode* is omitted and a "
71
71
"file-like object is passed as *file*, ``file.mode`` is used as the default "
72
72
"value for *mode*."
73
73
msgstr ""
74
74
75
- #: ../../library/wave.rst:39
75
+ #: ../../library/wave.rst:40
76
76
msgid ""
77
77
"If you pass in a file-like object, the wave object will not close it when "
78
- "its :meth:` close` method is called; it is the caller's responsibility to "
79
- "close the file object."
78
+ "its `` close()`` method is called; it is the caller's responsibility to close "
79
+ "the file object."
80
80
msgstr ""
81
81
82
- #: ../../library/wave.rst:43
82
+ #: ../../library/wave.rst:44
83
83
msgid ""
84
84
"The :func:`.open` function may be used in a :keyword:`with` statement. When "
85
- "the :keyword:`!with` block completes, the :meth:`Wave_read.close() <wave."
86
- "Wave_read.close>` or :meth:`Wave_write.close() <wave.Wave_write.close()>` "
87
- "method is called."
85
+ "the :keyword:`!with` block completes, the :meth:`Wave_read.close()` or :meth:"
86
+ "`Wave_write.close()` method is called."
88
87
msgstr ""
89
88
90
- #: ../../library/wave.rst:48 ../../library/wave.rst:164
89
+ #: ../../library/wave.rst:48 ../../library/wave.rst:172
91
90
msgid "Added support for unseekable files."
92
91
msgstr ""
93
92
@@ -101,178 +100,188 @@ msgstr ""
101
100
msgid "Wave_read Objects"
102
101
msgstr "Wave_read 物件"
103
102
104
- #: ../../library/wave.rst:62
103
+ #: ../../library/wave.rst:64
104
+ msgid "Read a WAV file."
105
+ msgstr ""
106
+
107
+ #: ../../library/wave.rst:66
105
108
msgid ""
106
109
"Wave_read objects, as returned by :func:`.open`, have the following methods:"
107
110
msgstr ""
108
111
109
- #: ../../library/wave.rst:67
112
+ #: ../../library/wave.rst:71
110
113
msgid ""
111
114
"Close the stream if it was opened by :mod:`wave`, and make the instance "
112
115
"unusable. This is called automatically on object collection."
113
116
msgstr ""
114
117
115
- #: ../../library/wave.rst:73
118
+ #: ../../library/wave.rst:77
116
119
msgid "Returns number of audio channels (``1`` for mono, ``2`` for stereo)."
117
120
msgstr ""
118
121
119
- #: ../../library/wave.rst:78
122
+ #: ../../library/wave.rst:82
120
123
msgid "Returns sample width in bytes."
121
124
msgstr ""
122
125
123
- #: ../../library/wave.rst:83
126
+ #: ../../library/wave.rst:87
124
127
msgid "Returns sampling frequency."
125
128
msgstr ""
126
129
127
- #: ../../library/wave.rst:88
130
+ #: ../../library/wave.rst:92
128
131
msgid "Returns number of audio frames."
129
132
msgstr ""
130
133
131
- #: ../../library/wave.rst:93
134
+ #: ../../library/wave.rst:97
132
135
msgid "Returns compression type (``'NONE'`` is the only supported type)."
133
136
msgstr ""
134
137
135
- #: ../../library/wave.rst:98
138
+ #: ../../library/wave.rst:102
136
139
msgid ""
137
140
"Human-readable version of :meth:`getcomptype`. Usually ``'not compressed'`` "
138
141
"parallels ``'NONE'``."
139
142
msgstr ""
140
143
141
- #: ../../library/wave.rst:104
144
+ #: ../../library/wave.rst:108
142
145
msgid ""
143
146
"Returns a :func:`~collections.namedtuple` ``(nchannels, sampwidth, "
144
- "framerate, nframes, comptype, compname)``, equivalent to output of the :meth: "
145
- "`get\\ * ` methods."
147
+ "framerate, nframes, comptype, compname)``, equivalent to output of the "
148
+ "`` get*()` ` methods."
146
149
msgstr ""
147
150
148
- #: ../../library/wave.rst:111
151
+ #: ../../library/wave.rst:115
149
152
msgid ""
150
153
"Reads and returns at most *n* frames of audio, as a :class:`bytes` object."
151
154
msgstr ""
152
155
153
- #: ../../library/wave.rst:116
156
+ #: ../../library/wave.rst:120
154
157
msgid "Rewind the file pointer to the beginning of the audio stream."
155
158
msgstr ""
156
159
157
- #: ../../library/wave.rst:118
160
+ #: ../../library/wave.rst:122
158
161
msgid ""
159
162
"The following two methods are defined for compatibility with the :mod:`aifc` "
160
163
"module, and don't do anything interesting."
161
164
msgstr ""
162
165
163
- #: ../../library/wave.rst:124
166
+ #: ../../library/wave.rst:128
164
167
msgid "Returns ``None``."
165
168
msgstr ""
166
169
167
- #: ../../library/wave.rst:129
170
+ #: ../../library/wave.rst:133
168
171
msgid "Raise an error."
169
172
msgstr ""
170
173
171
- #: ../../library/wave.rst:131
174
+ #: ../../library/wave.rst:135
172
175
msgid ""
173
176
"The following two methods define a term \" position\" which is compatible "
174
177
"between them, and is otherwise implementation dependent."
175
178
msgstr ""
176
179
177
- #: ../../library/wave.rst:137
180
+ #: ../../library/wave.rst:141
178
181
msgid "Set the file pointer to the specified position."
179
182
msgstr ""
180
183
181
- #: ../../library/wave.rst:142
184
+ #: ../../library/wave.rst:146
182
185
msgid "Return current file pointer position."
183
186
msgstr ""
184
187
185
- #: ../../library/wave.rst:148
188
+ #: ../../library/wave.rst:152
186
189
msgid "Wave_write Objects"
187
190
msgstr "Wave_write 物件"
188
191
189
- #: ../../library/wave.rst:150
192
+ #: ../../library/wave.rst:156
193
+ msgid "Write a WAV file."
194
+ msgstr ""
195
+
196
+ #: ../../library/wave.rst:158
197
+ msgid "Wave_write objects, as returned by :func:`.open`."
198
+ msgstr ""
199
+
200
+ #: ../../library/wave.rst:160
190
201
msgid ""
191
202
"For seekable output streams, the ``wave`` header will automatically be "
192
203
"updated to reflect the number of frames actually written. For unseekable "
193
204
"streams, the *nframes* value must be accurate when the first frame data is "
194
205
"written. An accurate *nframes* value can be achieved either by calling :"
195
- "meth:`~Wave_write.setnframes` or :meth:`~Wave_write.setparams` with the "
196
- "number of frames that will be written before :meth:`~Wave_write.close` is "
197
- "called and then using :meth:`~Wave_write.writeframesraw` to write the frame "
198
- "data, or by calling :meth:`~Wave_write.writeframes` with all of the frame "
199
- "data to be written. In the latter case :meth:`~Wave_write.writeframes` will "
200
- "calculate the number of frames in the data and set *nframes* accordingly "
201
- "before writing the frame data."
206
+ "meth:`setnframes` or :meth:`setparams` with the number of frames that will "
207
+ "be written before :meth:`close` is called and then using :meth:"
208
+ "`writeframesraw` to write the frame data, or by calling :meth:`writeframes` "
209
+ "with all of the frame data to be written. In the latter case :meth:"
210
+ "`writeframes` will calculate the number of frames in the data and set "
211
+ "*nframes* accordingly before writing the frame data."
202
212
msgstr ""
203
213
204
- #: ../../library/wave.rst:162
205
- msgid ""
206
- "Wave_write objects, as returned by :func:`.open`, have the following methods:"
214
+ #: ../../library/wave.rst:175
215
+ msgid "Wave_write objects have the following methods:"
207
216
msgstr ""
208
217
209
- #: ../../library/wave.rst:170
218
+ #: ../../library/wave.rst:179
210
219
msgid ""
211
220
"Make sure *nframes* is correct, and close the file if it was opened by :mod:"
212
221
"`wave`. This method is called upon object collection. It will raise an "
213
222
"exception if the output stream is not seekable and *nframes* does not match "
214
223
"the number of frames actually written."
215
224
msgstr ""
216
225
217
- #: ../../library/wave.rst:178
226
+ #: ../../library/wave.rst:187
218
227
msgid "Set the number of channels."
219
228
msgstr ""
220
229
221
- #: ../../library/wave.rst:183
230
+ #: ../../library/wave.rst:192
222
231
msgid "Set the sample width to *n* bytes."
223
232
msgstr ""
224
233
225
- #: ../../library/wave.rst:188
234
+ #: ../../library/wave.rst:197
226
235
msgid "Set the frame rate to *n*."
227
236
msgstr ""
228
237
229
- #: ../../library/wave.rst:190
238
+ #: ../../library/wave.rst:199
230
239
msgid "A non-integral input to this method is rounded to the nearest integer."
231
240
msgstr ""
232
241
233
- #: ../../library/wave.rst:197
242
+ #: ../../library/wave.rst:206
234
243
msgid ""
235
244
"Set the number of frames to *n*. This will be changed later if the number "
236
245
"of frames actually written is different (this update attempt will raise an "
237
246
"error if the output stream is not seekable)."
238
247
msgstr ""
239
248
240
- #: ../../library/wave.rst:204
249
+ #: ../../library/wave.rst:213
241
250
msgid ""
242
251
"Set the compression type and description. At the moment, only compression "
243
252
"type ``NONE`` is supported, meaning no compression."
244
253
msgstr ""
245
254
246
- #: ../../library/wave.rst:210
255
+ #: ../../library/wave.rst:219
247
256
msgid ""
248
257
"The *tuple* should be ``(nchannels, sampwidth, framerate, nframes, comptype, "
249
- "compname)``, with values valid for the :meth:` set\\ * ` methods. Sets all "
258
+ "compname)``, with values valid for the `` set*()` ` methods. Sets all "
250
259
"parameters."
251
260
msgstr ""
252
261
253
- #: ../../library/wave.rst:217
262
+ #: ../../library/wave.rst:226
254
263
msgid ""
255
264
"Return current position in the file, with the same disclaimer for the :meth:"
256
265
"`Wave_read.tell` and :meth:`Wave_read.setpos` methods."
257
266
msgstr ""
258
267
259
- #: ../../library/wave.rst:223
268
+ #: ../../library/wave.rst:232
260
269
msgid "Write audio frames, without correcting *nframes*."
261
270
msgstr ""
262
271
263
- #: ../../library/wave.rst:225 ../../library/wave.rst:236
272
+ #: ../../library/wave.rst:234 ../../library/wave.rst:245
264
273
msgid "Any :term:`bytes-like object` is now accepted."
265
274
msgstr ""
266
275
267
- #: ../../library/wave.rst:231
276
+ #: ../../library/wave.rst:240
268
277
msgid ""
269
278
"Write audio frames and make sure *nframes* is correct. It will raise an "
270
279
"error if the output stream is not seekable and the total number of frames "
271
280
"that have been written after *data* has been written does not match the "
272
281
"previously set value for *nframes*."
273
282
msgstr ""
274
283
275
- #: ../../library/wave.rst:240
284
+ #: ../../library/wave.rst:248
276
285
msgid ""
277
286
"Note that it is invalid to set any parameters after calling :meth:"
278
287
"`writeframes` or :meth:`writeframesraw`, and any attempt to do so will "
0 commit comments