Skip to content

Instantly share code, notes, and snippets.

@fekberg
Created December 12, 2013 02:49
Show Gist options
  • Select an option

  • Save fekberg/bac40e784113dd75c03e to your computer and use it in GitHub Desktop.

Select an option

Save fekberg/bac40e784113dd75c03e to your computer and use it in GitHub Desktop.
Titanic Theme
using System;
using System.Speech.Synthesis;
using System.Threading.Tasks;
namespace Titanic
{
class Program
{
static void Main(string[] args)
{
Task.Run(() =>
{
Console.Beep(520, 215);
Console.Beep(520, 265);
Console.Beep(520, 265);
Console.Beep(520, 215);
Console.Beep(560, 215);
Console.Beep(520, 215);
});
Task.Run(() =>
{
SpeechSynthesizer synth = new SpeechSynthesizer();
synth.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Senior);
synth.SpeakAsync("Every night in my dreams");
});
Console.ReadLine();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment