@Operator public final class EncodeWav extends PrimitiveOp implements Operand<String>
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.
`audio` is a 2-D float Tensor of shape `[length, channels]`. `sample_rate` is a scalar Tensor holding the rate to use (e.g. 44100).
operation| Modifier and Type | Method and Description |
|---|---|
Output<String> |
asOutput()
Returns the symbolic handle of a tensor.
|
Output<String> |
contents()
0-D.
|
static EncodeWav |
create(Scope scope,
Operand<Float> audio,
Operand<Integer> sampleRate)
Factory method to create a class to wrap a new EncodeWav operation to the graph.
|
equals, hashCode, toStringpublic static EncodeWav create(Scope scope, Operand<Float> audio, Operand<Integer> sampleRate)
scope - current graph scopeaudio - 2-D with shape `[length, channels]`.sampleRate - Scalar containing the sample frequency.public Output<String> asOutput()
OperandInputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.
asOutput in interface Operand<String>OperationBuilder.addInput(Output)Copyright © 2015–2019. All rights reserved.