MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / AudioSpectrogram

Function AudioSpectrogram

tensorflow/go/op/wrappers.go:31244–31261  ·  view source on GitHub ↗

Produces a visualization of audio data over time. Spectrograms are a standard way of representing audio information as a series of slices of frequency information, one slice for each window of time. By joining these together into a sequence, they form a distinctive fingerprint of the sound over tim

(scope *Scope, input tf.Output, window_size int64, stride int64, optional ...AudioSpectrogramAttr)

Source from the content-addressed store, hash-verified

31242//
31243// Returns 3D representation of the audio frequencies as an image.
31244func AudioSpectrogram(scope *Scope, input tf.Output, window_size int64, stride int64, optional ...AudioSpectrogramAttr) (spectrogram tf.Output) {
31245 if scope.Err() != nil {
31246 return
31247 }
31248 attrs := map[string]interface{}{"window_size": window_size, "stride": stride}
31249 for _, a := range optional {
31250 a(attrs)
31251 }
31252 opspec := tf.OpSpec{
31253 Type: "AudioSpectrogram",
31254 Input: []tf.Input{
31255 input,
31256 },
31257 Attrs: attrs,
31258 }
31259 op := scope.AddOperation(opspec)
31260 return op.Output(0)
31261}
31262
31263// StatefulUniformAttr is an optional argument to StatefulUniform.
31264type StatefulUniformAttr func(optionalAttr)

Callers 2

TESTFunction · 0.85
WavToSpectrogramFunction · 0.85

Calls 4

aClass · 0.85
ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by 2

TESTFunction · 0.68
WavToSpectrogramFunction · 0.68