Sounds directory

Greetings:

I have replaced all of the original Allison files with a much, much faster (about 3.5x faster) TTS-generated sound pack that I made with the Apple Fred voice for my own personal ASL3 nodes. I am a screen reader user, so I prefer having super fast speech. Not something you’d want on a repeater, necessarily.

Anyway, where can I put these files so they aren’t clobbered when ASL is updated?
They are currently in /usr/share/asterisk/sounds/en.
The directory structure /var/lib/asterisk/sounds/ exists, but if I put all the files there, nothing happens.
What is Asterisk’s priority for looking at sound files?

Thanks and 73
N2DYI

Here’s some information to work with :

First, I don’t see the ASL updates replacing any of the included sounds … but can’t guarantee that the packaged sound will never change.

Looking at the [Asterisk] source code it looks like there is support for using sound files from the “/var/lib/asterisk/sounds/custom/” directory.

  • by default, the “custom” directory is NOT consulted.
  • you can enabled searching the “custom” directory by changing the “sounds_search_custom_dir” variable in the /etc/asterisk/asterisk.conf file.

Note: *I* have not tried using the “custom” directory for sounds. Please let us know if you venture down this path and have success (or not).

Just a thought that you might try changing it’s write bit to keep it from being over-written.
Not sure if that will work.
Updated sound files are very rare. Updates normally only contain updated products.
But I would keep a backup copy on disk that makes it easy to re-write the directory.

There use to be a directive to change the sound file location, but it escapes me this morning.

While you may have read this or know this already,
https://wiki.allstarlink.org/wiki/Sounds_-_Files_and_Recording

It should be /var/lib/asterisk/sounds/${LANG} but that appears to be ignored with the current software at the moment. I’ve opened a bug:

Interesting …

/usr/share/asterisk/sounds/en has lots of content

… and …

/usr/share/asterisk/sounds/custom is a symlink to /usr/local/share/asterisk/sounds

I’m sure that we’ll get this sorted :smile:

Okay, so @WA3WCO and I looked into this today. There’s TWO directories that should work:

  1. Stock sounds in /usr/share/asterisk/sounds
  2. Custom sounds in /usr/local/share/asterisk/sounds

To enable custom sounds, edit /etc/asterisk/asterisk.conf and edit:

sounds_search_custom_dir = yes;  This option, if enabled, will
                ; cause Asterisk to search for sounds files in
                ; AST_DATA_DIR/sounds/custom before searching the
                ; normal directories like AST_DATA_DIR/sounds/<lang>.

Currently the default is “no”. If you make it ‘yes’ it will look in/usr/local/share/asterisk/sounds first.

The next release of asl3-asterisk will cleanup the broken /var/lib/asterisk/sounds stuff. See Enable and Fix Custom Sound Dirs by jxmx · Pull Request #36 · AllStarLink/asl3-asterisk · GitHub

1 Like

Then I take it that the custom directory inserts
needs to be in the same structure framework as the standard to be a substitute,
being as example

/usr/local/share/asterisk/sounds/en/rpt …etc

If you were trying to create a working substitute as this user is.

or, could they just be bundled up in one directory ?
Just looking for some clarity.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.