I don’t know if this is any value to you but I play sounds from LUA and I DO need the rate in the file path:
 local rr   = session:getVariable("read_rate")    -- add rate to path since real full path is also needed in some functions
if rr == nil then
     rr = "8000"    -- happens for internal testing calls
   end
   rr = "8000"    -- force to 8000 since that is all we have for sounds, started problem 5/21/14
   em1rp   = sound_path.."/"..rr.."/em1.wav"
   em2rp   = sound_path.."/"..rr.."/em2.wav"

Mario


On Aug 8, 2016, at 2:05 PM, Don Hawkins <hawkins@hawkinsegroup.com> wrote:

It should work. Do you have the console log around the time it's trying to play the file?

Sincerely,
Don Hawkins

Sent from my NationPCS® Nexus 6.


On Aug 8, 2016 8:47 AM, "Dave Horton" <daveh@beachdognet.com> wrote:
Ok I am not playing MP3 files just the files in the sounds directory   Should that still work and why is mod shout necessary? I am using the standard play and get digits, playback, play and detect speech apps etc

Sent from my iPhone

On Aug 7, 2016, at 11:15 PM, Don Hawkins <hawkins@hawkinsegroup.com> wrote:

Simple answer is no, you don't have to specific the sample rate. If your doing mp3 make sure mod_shout is loaded. I have plenty of code working properly with no sample rate specified, but all the wav files are 8k.

Sincerely,
Don Hawkins

Sent from my NationPCS® Nexus 6.


On Aug 7, 2016 10:50 PM, "Dave Horton" <daveh@beachdognet.com> wrote:
When using the playback application (or play_and_get_digits etc) do I need to specify the full path to the file under the base sounds directory, including the sample rate (e.g. 8000).

It’s a bit cumbersome to have to put the sample rate into the file string since that is dynamically determined at call set up, and I _thought_ that freeswitch
had the ability to automatically factor that in when locating the file.  However, I can’t find examples that do that — am I wrong, and must I somehow
concoct a file string that will be different per call if different codecs are chosen?



_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org