hi I have a requirement in which i am updating the token number i am using SpeechSynthesizer but after the sound play my is not returning it is in blocking mode and never end execution.
- public async Task<ActionResult> UpdateCounter(Counter counter)
- {
- using (CounterAppForANTHEntities1 entities = new CounterAppForANTHEntities1())
- {
- Counter updatedCustomer = (from c in entities.Counters
- where c.id == 1
- select c).FirstOrDefault();
- updatedCustomer.Counter_value = updatedCustomer.Counter_value+1;
- Console.Beep(767, 800);
- entities.SaveChanges();
- SpeechSynthesizer synthesizer = new SpeechSynthesizer();
- synthesizer.Rate = 0;
- synthesizer.Volume = 100;
- int res = updatedCustomer.Counter_value;
- string value = "Token Number" + IntToString(res);
-
- synthesizer.SpeakAsync(value);
- return View(updatedCustomer);
-
- }
- return RedirectToAction("Index");
- }