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

Function EncodeWav

tensorflow/go/op/wrappers.go:20349–20361  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

20347//
20348// Returns 0-D. WAV-encoded file contents.
20349func 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//

Callers 1

TESTFunction · 0.85

Calls 3

ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by 1

TESTFunction · 0.68