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)
| 31242 | // |
| 31243 | // Returns 3D representation of the audio frequencies as an image. |
| 31244 | func 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. |
| 31264 | type StatefulUniformAttr func(optionalAttr) |