Advanced Audio Field
by Ignatius Interactive https://ignatiusinteractive.com/odoo/audio_i2_field$ 263.08
Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 1608 |
Technical Name |
audio_i2_field |
License | AGPL-3 |
Website | https://ignatiusinteractive.com/odoo/audio_i2_field |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 1608 |
Technical Name |
audio_i2_field |
License | AGPL-3 |
Website | https://ignatiusinteractive.com/odoo/audio_i2_field |
Advanced Audio Field/Widget
Adds a new binary field/widget that specializes on upload, conversion and download of audio files. The main advantage
of using this widget over the built-in binary_field
is that it gives the user the option to save all
audio files uploaded in a specific audio format. For example, if you require all audio files to be saved as
.mp3
files with a specific sample rate e.g. 32kHz, all other audio files e.g. .m4a
or
.wav
will be converted to the desired format before being saved. This allows audio files to be saved in a
consistent audio format and with consistent properties, which will be advantageous for businesses
that deal with audio data.
How To Use
Basic Usage
Specify the target audio format (target_format
property) in order to enable the conversion of any audio
files that does match the target format.
<field name="audio_sample" widget="audio_i2" target_format="wav" />
With Advanced Options
This widget allows you to customize the converted audio file's sample rate, channels and codec to use.
<field name="audio_sample" widget="audio_i2" target_format="wav" sample_rate="16000" channels="1" codec="pcm_s16le" />
Without Conversion
You can use this widget as a replacement for binary_field
without configuring audio conversion.
You can do this by omitting the target_format
property.
<field name="audio_sample" widget="audio_i2" />
Reference
Properties
Name | Type | Default Value | Description |
---|---|---|---|
target_format | "mp3" | "mp4" | "wav" | "ogg" | undefined |
Optional but recomended. These are the audio formats currently supported. If it's not set, conversion is disabled. |
channels | string | number |
undefined |
Optional. Value depends on codec choosen. |
sample_rate | string | number |
undefined |
Optional. Value depends on codec choosen. |
codec | string |
undefined |
Optional. Available codecs depends on audio format choosen. |
preload | boolean |
false |
Optional. Whether to attempt to preload/download tools used for conversion when client first loads the form, or wait until a file actually needs to be converted. Note: the tools have a size of ~31 MB but is only downloaded once on a client's browser. |
show_logs | boolean |
false |
Optional. Whether to show logs from conversion process in the console. |
Available Codecs
Audio Format | Codecs |
---|---|
mp3 | mp3 |
mp4 | acc, mp3, mp2, mp1, alac, flac, opus |
wav | pcm_alaw, pcm_bluray, pcm_dvd, pcm_f16le, pcm_f24le, pcm_f32be, pcm_f32le, pcm_f64be, pcm_f64le, pcm_lxf, pcm_mulaw, pcm_s16be, pcm_s16be_planar, pcm_s16le, pcm_s16le_planar, pcm_s24be, pcm_s24daud, pcm_s24le, pcm_s24le_planar, pcm_s32be, pcm_s32le, pcm_s32le_planar, pcm_s64be, pcm_s64le, pcm_s8, pcm_s8_planar, pcm_sga, pcm_u16be, pcm_u16le, pcm_u24be, pcm_u24le, pcm_u32be, pcm_u32le, pcm_u8, pcm_vidc |
ogg | vorbis, opus, speex |
Please log in to comment on this module