Importer des échantillons audio

Pourquoi importer ?

Raw audio data in general is large and undesired. Godot provides two main options to import your audio data: WAV and Ogg Vorbis.

Each has different advantages.

  • WAV files use raw data or light compression, make few demands on the CPU to play back (hundreds of simultaneous voices in this format are fine), but take up significant space.
  • Ogg Vorbis files use a stronger compression that results in much smaller file size, but require significantly more processing power to play back.

Voici un tableau comparatif.

Format 1 second of audio
WAV 24-bit, 96 kHz, stereo 576 KB
WAV 16-bit, 44 kHz, mono 88 KB
WAV 16-bit, IMA-ADPCM, mono 22 KB
Ogg Vorbis 128 Kb/s, stereo 16 KB
Ogg Vorbis 96 Kb/s, stereo 12 KB

Consider using WAV for short and repetitive sound effects, and Ogg Vorbis for music, speech, and long sound effects.

Les meilleures pratiques

Godot has an extensive bus system with built-in effects. This saves SFX artists the need to add reverb to the sound effects, reducing their size greatly and ensuring correct trimming. Say no to SFX with baked reverb!


Comme vous pouvez le voir ci-dessus, les effets sonores deviennent énormes avec la réverbération ajoutée.


Un problème qui se produit souvent est que la forme d’onde est exportée avec de longs silences au début et à la fin. Celles-ci sont insérées par les DAW lors de l’enregistrement sur une forme d’onde, augmentent inutilement leur taille et ajoutent une latence au moment de leur lecture.

Importing as WAV with the Trimming option enabled solves this.


Godot supports looping in the samples (tools such as Sound Forge or Audition can add loop points to WAV files). This is useful for sound effects, such as engines, machine guns etc. Ping-pong looping is also supported.

As an alternative, the Import dock has a Loop option that enables looping for the entire sample when importing.