Yes its possible. What you need to do is , Record the message with the file name concatinating with the date and save it in the prompt location folder.
For Example :- RecMess_05122008_1 , RecMess_05122008_2,RecMess_05132008_3 .Once the messages are stored in the prompt location, go with the directory stucture and pick all the files and assign to QuestionAnswerActivity or statementactivity, append audio with bookmark and loop all the files , the questionanswer activity or statement activity will play all the prompts.
Before that you need to get only files of start date and end date ,for this get the file and append the file to arrayList with the start and end date of the file name.
then bind to Question answer activity or statement activity to prompt to the user.
Here is the code to save the recoreded message.
this.recordMessage.AudioEncoding = Microsoft.SpeechServer.Codec.Pcm
this.recordMessage.CanBargeIn = true;
this.recordMessage.EndSilenceTimeout = System.TimeSpan.Parse("00:00:01.5000000");
this.recordMessage.InitialSilenceTimeout = System.TimeSpan.Parse("00:00:01.5000000");
this.recordMessage.Name = "recordMessage";
this.recordMessage.PlayBeep = true;
this.recordMessage.SilenceTrimmedLength = System.TimeSpan.Parse("00:00:00.5000000");
this.recordMessage.TerminationDigits = Microsoft.SpeechServer.RecordTerminationDigits.None;
this.recordMessage.UseDefaultGrammars = true;
Once the code is added to the record message activity add a code activity , double click on the code activity and add the following code
as show below.
if (recordMessage.RecordedFilePath != null)
{
NameValueCollection Settings = ConfigurationManager.AppSettings;
string strRecorededPromptsLocation = @"c:\RecodedMessages";
string strFileName = "RecMess_" + DateTime.Now + ".wav";
string messageStorageLocation = strRecorededPromptsLocation + strFileName;
if (null != messageStorageLocation)
{
File.Copy(recordMessage.RecordedFilePath, messageStorageLocation, true);
}
}
Then add the logic to get the recoded files and bind to control.
A.K.Raju
Sr.Software Engineer
Speech server 2007.