Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve phonetic readout of lap + time #81

Open
PaulWieland opened this issue Aug 1, 2018 · 0 comments
Open

Improve phonetic readout of lap + time #81

PaulWieland opened this issue Aug 1, 2018 · 0 comments

Comments

@PaulWieland
Copy link

PaulWieland commented Aug 1, 2018

Right now the phonetic readout of the pilot plus lap plus time is a bit hard to comprehend because the lap number bleeds into the time.

Example: "Paul lap one one minute five seconds"

I believe this is the line responsible:

var $ttstest = msg.pilot + " lap " + msg.lap + " " + msg.phonetic;

I am going to try modifying this function on our timer to something like this (to be tested still):

		socket.on('phonetic_data', function (msg) {
			//	var $ttstest = msg.pilot + " lap " + msg.lap + " " + msg.phonetic;

			var phoneticLap="";
			switch(msg.lap){
				case 1: phoneticLap = "st"; break;
				case 2: phoneticLap = "nd"; break;
				case 3: phoneticLap = "rd"; break;
				default: phoneticLap = "th"; break;
			}
			var $ttstest = msg.pilot + " " + msg.lap + phoneticLap + " lap " + msg.lap + " " + msg.phonetic;
	
			speak('<div class="speech">' + $ttstest + '</div> div.speech');				
		})

That should hopefully cause it to say: "Paul first lap one minute five seconds"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant