snd.read {rPraat}R Documentation

snd.read

Description

Loads sound file (.wav or .mp3) using tuneR package.

Usage

snd.read(
  fileNameSound,
  fileType = "auto",
  from = 1,
  to = Inf,
  units = "samples"
)

Arguments

fileNameSound

Sound file name (.wav or .mp3)

fileType

"wav", "mp3" or "auto"

from

Where to start reading in units (beginning "samples": 1, "seconds": 0)

to

Where to stop reading in units (Inf = end of the file)

units

Units of from and to arguments: "samples" (starting from 1) or "seconds" (starting from 0)

Value

Sound object with normalized amplitude (PCM / 2^(nbits-1) - 1) resulting to the range of [-1; +1]. In fact, the minimum value can be one quantization step lower (e.g. PCM 16bit: -32768). t ... vector of discrete time instances (seconds) sig ... signal matrix (nrow(snd$sig) = number of samples, ncol(snd$sig) = number of channels, i.e., $sig[, 1] ... 1st channel) fs ... sample rate (Hz) nChannels ... number of signal channels (ncol(snd$sig)), 1 == mono, 2 == stereo nBits ... number of bits ped one sample nSamples ... number of samples (nrow(snd$sig)) duration ... duration of signal (seconds), snd$duration == snd$nSamples/snd$fs

See Also

snd.write, snd.plot, snd.cut, snd.getPointIndexNearestTime

Examples

## Not run: 
snd <- snd.read("demo/H.wav")
snd.plot(snd)

## End(Not run)

[Package rPraat version 1.3.2-1 Index]