Voicepacks.wiki
author sheepluva
Thu, 23 Mar 2023 20:47:32 +0000
changeset 2221 4bf8172a73a1
parent 1988 cf306f6c8af2
permissions -rw-r--r--
TableOfContents: TableOfContents: Adjust two Entries

#summary Short information about the structure and creation of voicepacks
= Voicepacks =
== Introduction ==
Voicepacks are collections of audio files which contain the taunts the hedgehogs say on various events.

== Creating voicepacks ==

A voicepack is a directory in `Data/Sounds/voices` and contains a bunch of audio files which are encoded in the Ogg Vorbis format. All the audio files should have a sample rate of 44100 Hz.

Each audio file represents a single taunt which is played at certain events. Only files with the correct file names will be recognized as taunts, other files will be ignored. For a list of recognized file names, see [Taunts].

Important links:

 * [Taunts]
 * [https://www.hedgewars.org/node/2132 Recording Voices for Hedgewars] (guide)

== Special voicepacks ==
The voicepack “Default” is the English default voice and is used as the ultimate fallback, if a voicepack cannot be found.

Voicepacks with a name of the form “`Name_<language>`” (where “Name” can be a name of your liking, and “`<language>`” is a language code) are for specifying a localized version of a voicepack. Voicepacks without the language code are assumed to be in English.

=== In Lua scripting ===

If in `AddTeam`, you use the special language code `qau`, then Hedgewars will try to play the matching localized version of that voicepack, with respect to the player's language (e.g. `Pirate_de`). If no localized version exists, Hedgewars falls back to the voicepack with no language code (e.g. `Pirate`).

For example, if you specify “`Default_qau`” as voice in `AddTeam` in Lua, Hedgewars will play `Default_ru` for Russian players, `Default_pl` for Polish players, `Default` for English players and players with no localized version of `Default` available yet. But if you just specify `Default` in `AddTeam`, the team will always use the English `Default` voicepack for all players.

In versions before 1.0.0, the special `qau` code did not exist and the automatic voicepack selection was kinda annoying. Hedgewars tried to force the automatic language selection pretty ruthlessly with no way to avoid it, and it was impossible to e.g. specify the `Default` voice explicitly.

== Sharing voicepacks ==
Custom voicepacks (voicepacks which are not part of the official Hedgewars installation) can only be heard by other players (online) if they have the voicepack installed under the same name.

In case the other player does not have the custom voicepack installed, the player will hear the default voice instead.

You are encouraged to share your voicepacks in the “[https://www.hedgewars.org/forum/19 Content Creations]” forum.