Encode audio data using the WAV file format. This operation will generate a string suitable to be saved out to create a .wav audio file. It will be encoded in the 16-bit PCM format. It takes in float values in the range -1.0f to 1.0f, and any outside that value will be clamped to that range. `audi
(scope *Scope, audio tf.Output, sample_rate tf.Output)
| 20347 | // |
| 20348 | // Returns 0-D. WAV-encoded file contents. |
| 20349 | func EncodeWav(scope *Scope, audio tf.Output, sample_rate tf.Output) (contents tf.Output) { |
| 20350 | if scope.Err() != nil { |
| 20351 | return |
| 20352 | } |
| 20353 | opspec := tf.OpSpec{ |
| 20354 | Type: "EncodeWav", |
| 20355 | Input: []tf.Input{ |
| 20356 | audio, sample_rate, |
| 20357 | }, |
| 20358 | } |
| 20359 | op := scope.AddOperation(opspec) |
| 20360 | return op.Output(0) |
| 20361 | } |
| 20362 | |
| 20363 | // Computes the sum along segments of a tensor. |
| 20364 | // |