The binary contents of the audio file to decode. This is a
scalar.
file_format
A string or scalar string tensor specifying which
format the contents will conform to. This can be mp3, mp4, ogg,
or wav.
samples_per_second
The number of samples per second that is
assumed, as an int or scalar int32 tensor. In some cases,
resampling will occur to generate the correct sample rate.
channel_count
The number of channels that should be created from the
audio contents, as an int or scalar int32 tensor. If the
contents have more than this number, then some channels will
be merged or dropped. If contents has fewer than this, then
additional channels will be created from the existing ones.
stream
A string specifying which stream from the content file
should be decoded, e.g., '0' means the 0-th stream.
The default value is '' which leaves the decision to ffmpeg.
Returns
A rank-2 tensor that has time along dimension 0 and channels along
dimension 1. Dimension 0 will be samples_per_second *
length_in_seconds wide, and dimension 1 will be channel_count
wide. If ffmpeg fails to decode the audio then an empty tensor will
be returned.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.ffmpeg.decode_audio\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/ffmpeg/ffmpeg_ops.py#L33-L71) |\n\nCreate an op that decodes the contents of an audio file. (deprecated) \n\n tf.contrib.ffmpeg.decode_audio(\n contents, file_format=None, samples_per_second=None, channel_count=None,\n stream=None\n )\n\n| **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed after 2018-09-04. Instructions for updating: tf.contrib.ffmpeg will be removed in 2.0, the support for video and audio will continue to be provided in tensorflow-io: \u003chttps://github.com/tensorflow/io\u003e\n\nNote that ffmpeg is free to select the \"best\" audio track from an mp4.\n\u003chttps://trac.ffmpeg.org/wiki/Map\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `contents` | The binary contents of the audio file to decode. This is a scalar. |\n| `file_format` | A string or scalar string tensor specifying which format the contents will conform to. This can be mp3, mp4, ogg, or wav. |\n| `samples_per_second` | The number of samples per second that is assumed, as an `int` or scalar `int32` tensor. In some cases, resampling will occur to generate the correct sample rate. |\n| `channel_count` | The number of channels that should be created from the audio contents, as an `int` or scalar `int32` tensor. If the `contents` have more than this number, then some channels will be merged or dropped. If `contents` has fewer than this, then additional channels will be created from the existing ones. |\n| `stream` | A string specifying which stream from the content file should be decoded, e.g., '0' means the 0-th stream. The default value is '' which leaves the decision to ffmpeg. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A rank-2 tensor that has time along dimension 0 and channels along dimension 1. Dimension 0 will be `samples_per_second * length_in_seconds` wide, and dimension 1 will be `channel_count` wide. If ffmpeg fails to decode the audio then an empty tensor will be returned. ||\n\n\u003cbr /\u003e"]]