# Problem with voiceovers in different languages

**URL:** <https://qa.fmod.com/t/problem-with-voiceovers-in-different-languages/22039>\
**Category:** Unreal Engine\
**Created:** [August 26, 2024, 11:35am UTC](https://qa.fmod.com/t/problem-with-voiceovers-in-different-languages/22039 "2024-08-26T11:35:30Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [October 15, 2024, 3:56am UTC](https://qa.fmod.com/t/problem-with-voiceovers-in-different-languages/22039/5 "2024-10-15T03:56:06Z")

</div>

Hi,

Thank you for sharing the information.

What version of UE and the integration are you using?

> [@BashOrgRu](#):
>
> For each dialogue, we already have its own event, which is connected in the code.

Could you elaborate on this please?

> [@BashOrgRu](#):
>
> I read a forum post from 2022, which mentioned that it’s not possible to get the length of an individual audio track without using a callback. But that was two years ago. Is there any workaround now?

As of the latest version of FMOD, there is still no direct way to retrieve the length of an individual audio track without using callbacks.

You could consider recursively searching a ChannelGroup and all its sub-groups to find and return the current active sound playing, which you could then retrieve its length. Please refer to  
[Channel::getChannelGroup](https://fmod.com/docs/2.02/api/core-api-channel.html#channel_getchannelgroup)  
[ChannelGroup::getNumChannels](https://fmod.com/docs/2.02/api/core-api-channelgroup.html#channelgroup_getnumchannels)  
[ChannelGroup::getNumGroups](https://fmod.com/docs/2.02/api/core-api-channelgroup.html#channelgroup_getnumgroups)  
[Channel::getCurrentSound](https://fmod.com/docs/2.02/api/core-api-channel.html#channel_getcurrentsound)

> [@BashOrgRu](#):
>
> Simply add another sound track with a another one language to the event.

You could indeed create a parameter sheet to control the language switch and automate the volume of each track based on the parameter index(0 = English, 1 = Japanese, 2 = Chinese .etc) and called [Studio::EventInstance::setParameterByName](https://fmod.com/docs/2.02/api/studio-api-eventinstance.html#studio_eventinstance_setparameterbyname) via code to set target language index:

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcuPdOfeHMqQMzRZIawaKCUQJ2oHlOwfDfEtBPRuwXFZGbxdrYTJB56w6zkxrv9XODst7HAFzKdsXthTPs_VIWO7X1dLCV3A1iiVaDPSQ4Rlm-6F1Lu7ZZZR5EgECsFgTMfKpUEi3zQeS8oeVHDIBVt6_FL?key=yO63GfOEUQzsiMAVC7VIFg)

> [@BashOrgRu](#):
>
> Get the duration of this particular sound in the code. (by some way)

For simple subtitle timing, you could consider using [Studio::EventInstance::getTimelinePosition](https://fmod.com/docs/2.02/api/studio-api-eventinstance.html#studio_eventinstance_gettimelineposition) along with `getLength()` to manually check if the current event has finished. This approach could be a temporary solution for a demo release but please note that it is less efficient and precise compared to using callbacks.

> [@BashOrgRu](#):
>
> I understand that when there are more than two localizations, all these sounds will be loaded into memory. But for now, we are working on a demo, and I have a feeling that if we implement localization in the “correct” way, we would have to significantly change the engine code and rework all the existing events. Please correct me if I’m wrong.

You are correct that loading multiple audio tracks for localization into memory could be an issue and might impact your games’ coding structure, but for a demo release, this might be acceptable.

> [@BashOrgRu](#):
>
> We haven’t fully figured out yet how to properly implement localization using “event callback,” “audio table,” and “programming sounds.” We will definitely look into this.

There’s a similar post that might help you understand how to set up localization with `programmer sound` and `audio table` if you decide to implement that in the future: [Parameter to swap between programmer instruments](https://qa.fmod.com/t/parameter-to-swap-between-programmer-instruments/21970)

You could also consider having a look at our [callback scripting example](https://fmod.com/docs/2.02/api/studio-guide.html#scripting-example) for reference.

Hope this helps, let me know if you have any questions.

---

_[View the full topic](https://qa.fmod.com/t/problem-with-voiceovers-in-different-languages/22039)._
