AppleScript - Speak Current Time

on getTimeInHoursAndMinutes()
– Get the “hour”
set timeStr to time string of (current date)
set Pos to offset of “:” in timeStr
set theHour to characters 1 thru (Pos - 1) of timeStr as string
set timeStr to characters (Pos + 1) through end of timeStr as string

– Get the “minute”
set Pos to offset of “:” in timeStr
set theMin to characters 1 thru (Pos - 1) of timeStr as string
set timeStr to characters (Pos + 1) through end of timeStr as string

–Get “AM or PM”
set Pos to offset of “ ” in timeStr
set theSfx to characters (Pos + 1) through end of timeStr as string

return (theHour & “:” & theMin & “ ” & theSfx) as string
end getTimeInHoursAndMinutes

say “The current time is ” & getTimeInHoursAndMinutes() using “Alex”