Convert Morse Code from string to bytes[] and then convert to stream for audio playback. See Examples Below.
Install using Package Manager console
Install-Package MorseCodeToAudio
TextToMorse converter = new TextToMorse();
byte[] convertedbytes = converter.ConvertToMorse(MorseText);
Now using convertedbytes
you can convert this to a Stream
and create/play audio. See UWP
Specific Sample below
You can also control the Character Speed, Words Per Minute and Frequency of the Audio.
TextToMorse converter = new TextToMorse(20,20,600);
byte[] convertedbytes = converter.ConvertToMorse(MorseText);
You can use MemoryRandomAccessStream to convert this to Stream
and Play using Media Player.
byte[] outfile = converter.ConvertToMorse(Text);
MemoryRandomAccessStream randomAccessStream = new MemoryRandomAccessStream(outfile);
MediaPlayer mediaPlayer = new MediaPlayer();
mediaPlayer.Source = MediaSource.CreateFromStream(randomAccessStream, "wav");
mediaPlayer.Play();
This Project is based on jstoddard/CWLibrary. Thanks to @jstoddard for his awesome Library.