[asterisk-dev] language-specific sound directories

Kevin P. Fleming kpfleming at digium.com
Fri Jan 27 11:21:21 MST 2006


Luigi Rizzo wrote:
> looking at file.c it seems that language-specific
> sound files are intermixed - e.g. we have
> 
> 	.../sounds/digits/*	english digits
> 	.../sounds/digits/it/*	italian digits
> 	.../sounds/letters/*	english letters
> 	.../sounds/letters/it/*	italian letters

I wasn't around when this layout was designed, but my assumption is that 
it was done so that searching for a language vs. no-language is easy, 
without having to split apart the path that was provided.

> and so on. I would have expected separate trees for
> each language i.e.
> 
> 	.../sounds/en/*		everything in english
> 	.../sounds/it/*		everything in italian
> 
> which would be way easier to manage if you have to install/delete
> third-party voice files.

Yes, it would, but it requires the path supplied to the file open 
functions to be split into two pieces (or have some sort of substitution 
mechanism to control where the language code gets inserted).

Keep in mind that sound file are _not_ required to be kept under the 
../sounds directory; as it works today, I can specify 
Playback(/long/path/to/sound/file/in/my/directory) and the language code 
still gets added to the end when needed.



More information about the asterisk-dev mailing list