@@ -207,7 +207,7 @@ def from_data(
207207
208208 Example:
209209 >>> import numpy as np
210- >>> PcmData.from_data(np.array([1, 2], np.int16), 16000, "s16", 1).channels
210+ >>> PcmData.from_data(np.array([1, 2], np.int16), sample_rate= 16000, format= "s16", channels= 1).channels
211211 1
212212 """
213213 if isinstance (data , (bytes , bytearray , memoryview )):
@@ -270,7 +270,7 @@ def resample(
270270
271271 Example:
272272 >>> import numpy as np
273- >>> pcm = PcmData(np.arange(8, dtype=np.int16), 16000, "s16", 1)
273+ >>> pcm = PcmData(samples= np.arange(8, dtype=np.int16), sample_rate= 16000, format= "s16", channels= 1)
274274 >>> pcm.resample(16000, target_channels=2).channels
275275 2
276276 """
@@ -411,7 +411,7 @@ def to_bytes(self) -> bytes:
411411
412412 Example:
413413 >>> import numpy as np
414- >>> pcm = PcmData(np.array([[1, -1]], np.int16), 16000, "s16", 1)
414+ >>> pcm = PcmData(samples= np.array([[1, -1]], np.int16), sample_rate= 16000, format= "s16", channels= 1)
415415 >>> len(pcm.to_bytes()) > 0
416416 True
417417 """
@@ -452,7 +452,7 @@ def to_wav_bytes(self) -> bytes:
452452
453453 Example:
454454 >>> import numpy as np
455- >>> pcm = PcmData(np.array([0, 0], np.int16), 16000, "s16", 1)
455+ >>> pcm = PcmData(samples= np.array([0, 0], np.int16), sample_rate= 16000, format= "s16", channels= 1)
456456 >>> with open("out.wav", "wb") as f: # write to disk
457457 ... _ = f.write(pcm.to_wav_bytes())
458458 """
@@ -494,7 +494,7 @@ def to_float32(self) -> "PcmData":
494494
495495 Example:
496496 >>> import numpy as np
497- >>> pcm = PcmData(np.array([0, 1], np.int16), 16000, "s16", 1)
497+ >>> pcm = PcmData(samples= np.array([0, 1], np.int16), sample_rate= 16000, format= "s16", channels= 1)
498498 >>> pcm.to_float32().samples.dtype == np.float32
499499 True
500500 """
@@ -544,8 +544,8 @@ def append(self, other: "PcmData") -> "PcmData":
544544
545545 Example:
546546 >>> import numpy as np
547- >>> a = PcmData(np.array([1, 2], np.int16), 16000, "s16", 1)
548- >>> b = PcmData(np.array([3, 4], np.int16), 16000, "s16", 1)
547+ >>> a = PcmData(samples= np.array([1, 2], np.int16), sample_rate= 16000, format= "s16", channels= 1)
548+ >>> b = PcmData(samples= np.array([3, 4], np.int16), sample_rate= 16000, format= "s16", channels= 1)
549549 >>> a.append(b).samples.tolist()
550550 [1, 2, 3, 4]
551551 """
@@ -718,7 +718,7 @@ def from_response(
718718 """Normalize provider response to PcmData or iterators of it.
719719
720720 Example:
721- >>> PcmData.from_response(b" \x00 \x00 " , sample_rate=16000, format="s16").sample_rate
721+ >>> PcmData.from_response(bytes([0, 0]) , sample_rate=16000, format="s16").sample_rate
722722 16000
723723 """
724724
0 commit comments