Write audio file 您所在的位置:网站首页 audiowrite函数 Write audio file

Write audio file

2023-06-23 18:06| 来源: 网络整理| 查看: 265

Name of file to write, or the full path to the file, specified as a character vector or string scalar that includes the file extension.

Depending on the location you are writing to, filename can take on one of these forms.

Location

Form

Current folder

To write to the current folder, specify the name of the file in filename.

Example:'sample_audio.wav'

Other folders

To write to a folder different from the current folder, specify the full or relative path name in filename.

Example: 'C:\myFolder\sample_audio.mp3'

Example: 'myFolder\sample_audio.wav'

Remote Location

To write to a remote location, filename must contain the full path of the file specified as a uniform resource locator (URL) of the form:

scheme_name://path_to_file/my_file.ext

Based on your remote location, scheme_name can be one of the values in this table.

Remote Location

scheme_name

Amazon S3™

s3

Windows Azure® Blob Storage

wasb, wasbs

HDFS™

hdfs

For more information, see Work with Remote Data.

Example: 's3://bucketname/path_to_file/sample_audio.mp3'

audiowrite supports the following file formats.

Platform Support

File Format

Abbreviation

File Extension

All platforms

Free Lossless Audio Codec

FLAC

.flac

MPEG-1 Audio Layer III MPEG-2 Audio Layer III MPEG-2.5 Audio Layer III

MP3

.mp3

OGG Vorbis

OGG

.ogg

OGG Opus

OPUS

.opus

Microsoft WAVE sound

WAV

.wav

Windows® and Mac

MPEG-4 Part 3 AAC

MP4

.m4a .mp4

Example: 'myFile.m4a'

Example: '../myFile.m4a'

Example: 'C:\temp\myFile.m4a'

When writing MP4 files on Windows, audiowrite pads the front and back of the output signal with extra samples of silence. The Windows AAC encoder also places a very sharp fade-in and fade-out on the audio. This results in audio with an increased number of samples after being written to disk.

On Linux® platforms, these requirements apply:

To write MP3 files with audiowrite, you must have libsndfile 1.1.0 or a later version installed. You must also have the LAME MP3 encoder and the mpg123 MP3 decoder installed.

To write OPUS files with audiowrite, you must have libsndfile 1.0.29 or a later version installed. You must also have the OPUS codec installed.

Data Types: char | string



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有