This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
V497_Vesper's profile picture

help with the update of Peripherals++

Started by V497_Vesper, 08 December 2015 - 07:13 PM
V497_Vesper #1
Posted 08 December 2015 - 08:13 PM
With the update of Peripherals++ and the now disabled Google TTS thing the speaker won't speak and the Minecraft Nuclear control Computercraft based PA system does not work now the modder has advised programmers to use the synthesize() command however i did that and the speaker still won't speak, this is the coding i have


speaker=peripheral.wrap("right")
local speaking = false
local red = true
while true do
  while red or speaking do --#while we are waiting for redstone or the speaker to finish
	local event = os.pullEvent() --#pull an event
	if event == "speechComplete" then --#if the speaker stopped speaking
	  speaking = false --#we are no longer waiting for it to finish
	elseif event == "redstone" then --#if a redstone change occured
	  red = false --#we are no longer waiting for redstone
	end
  end
  local input = rs.getBundledInput("back")
  speaking = true --#we're now waiting for it to speak
  red = true --#and for a redstone change to occur
  if colors.test(input,colors.red) then
	speaker.synthesize("Reactor Critical! Reactor critical! Meltdown Imminent")
  elseif colors.test(input,colors.pink) then
	speaker.synthesize("Danger! Reactor heat level Critical! Evacuate all none essential Personnel!")
  elseif colors.test(input,colors.green) then
	speaker.synthesize("Danger! Reactor Heat level at 6000 Degrees!")
  elseif colors.test(input,colors.yellow) then
	speaker.synthesize("Warning! Reactor Heat Level above Acceptable limit!")
  elseif colors.test(input,colors.blue) then
	speaker.synthesize("Caution! reactor Heat level at 4000 degrees!")
  elseif colors.test(input,colors.magenta) then
	speaker.synthesize("Caution! Reactor Heat above Normal Level!")
  elseif colors.test(input,colors.orange) then
	speaker.synthesize("Attention! Reactor Heat Level at 2000 degrees")
  elseif colors.test(input,colors.white) then
	speaker.synthesize("attention, Reactor heat level increase detected")
  else
	speaking = false --#we aren't waiting if it didn't speak, this is probably not needed but I like to program for any situation.
  end
end
as many of you will recognise this is the old PA system coding that you guys helped me with and with the update the speak command is now Depricated as the modder says
can anyone help me with getting this up and running again?
Edited on 08 December 2015 - 09:46 PM
Bomb Bloke #2
Posted 09 December 2015 - 09:46 AM
Installing ++ and testing your script I find it talks for me - but only on the first redstone state change, as you're looking for "speechComplete" instead of "synthComplete" events.

If you can't get anything out of it after tweaking that, then I can only suggest posting on the issue tracker. There's presumably a system requirement (some setting or other) that hasn't been documented.
Rougeminner #3
Posted 10 December 2015 - 02:15 AM
to answer the speaker problem it won't speak problem i have found that generally means that it can't handle something you have put in like ! or ?
Edited on 10 December 2015 - 01:38 AM