//-- Intent: takes the given array of VOICE_ALERT_PROFILE objects --//
//-- and returns the text content for the specified language. --//


var jsonString = ' \
[{ \
	"SpokenLanguage":"English", \
	"TTY_Text":"This is a test of the conferencing platform. You are being bridged onto a conference call now.", \
	"VoiceItem":[{ \
		"VoiceItemType":1, \
		"AudioSource":[{ \
			"$type":"SwiftReach.Swift911.Core.Messages.Voice.AUDIO_SOURCE_VOICE, SwiftReach.Swift911.Core", \
			"VoiceCode":100237, \
			"Content":"This is a test of the conferencing platform. You are being bridged onto a conference call now.", \
			"AutoGenerateVoice":true, \
			"FileVersion":0, \
			"AudioType":0 \
			}] \
		}] \
},{ \
	"SpokenLanguage":"Spanish", \
	"TTY_Text":"This is a test of the conferencing platform. You are being bridged onto a conference call now.", \
	"VoiceItem":[{ \
		"VoiceItemType":1, \
		"AudioSource":[{ \
			"$type":"SwiftReach.Swift911.Core.Messages.Voice.AUDIO_SOURCE_VOICE, SwiftReach.Swift911.Core", \
			"VoiceCode":100967, \
			"Content":"Se trata de una prueba de la plataforma de la Conferencia. Usted esta siendo puente en una conferencia telefonica ahora.", \
			"AutoGenerateVoice":false, \
			"FileVersion":0, \
			"AudioType":0 \
			}] \
		}] \
}]';

$.ajax({
  type: "POST",
  contentType: "application/json; charset=utf-8",
  headers: {"SwiftAPI-Key": "12345"},
  url: "http://api.v4.swiftreach.com/api/Messages/Voice/Helpers/VoiceContentProfileArrayToText/Spanish/alert_human",
  data: jsonString,
  dataType: "json"
  success: function(result) {
        // Do something with the result
    }

});

<!-- example return value -->
"Se trata de una prueba de la plataforma de la Conferencia. Usted esta siendo puente en una conferencia telefonica ahora."