-
Notifications
You must be signed in to change notification settings - Fork 2
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
enable communication with new SCU app #760
Conversation
Coverage of commit
|
lib/content/audio.ex
Outdated
@@ -15,10 +15,11 @@ defprotocol Content.Audio do | |||
|
|||
@type language :: :english | :spanish | |||
@type value :: canned_message() | ad_hoc_message() | nil | |||
@type tts_value :: {String.t(), [{String.t(), String.t(), integer()}] | nil} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a clarifying question because it's relevant to my current ticket: the first String here is what gets read out and the list of pages the transcription that gets shown, which is what lets us tweak the pronunciation of the TTS from whats shown visually? Would it be helpful to add two additional types audio_text
as String.t()
and visual_text
as [{String.t(), String.t(), integer()}] | nil
to communicate that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, can do. Also, for your ticket, take a look at the new paginate_text
helper if you haven't already.
Coverage of commit
|
lib/pa_ess/updater.ex
Outdated
list -> Enum.at(list, i, List.last(list)) | ||
end) | ||
|
||
^top_duration = bottom_duration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will crash the process if the top and bottom durations don't match. Is that desired, or would we want to just default to the top duration and log an error instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I put that in there as an assertion to make sure they match. Looking at the code, I think everything is the same now (6 seconds), and the intention is to enforce that going forward. If this seems to harsh, though, we could log an error instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think we loosely standardized on 6 seconds a while back so I guess this assertion would rarely, if ever, fail. But at least in concept, it does seem a bit harsh since every message gets funneled through this process which I think means a few consecutive crashes could be pretty disruptive.
Coverage of commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Summary of changes
Asana Ticket: RTS: Support communication with new SCU app
Implements the code path that sends messages to Scully, passing the audio strings through Watts first. Note that this code path is not expected to be used until we start converting stations, and there will be further changes before then. Notes:
Task
to crash, effectively skipping the entire message. This is a very coarse approach that we may want to tune up later.TODO
in the bus code is intended, for now. This will be implemented as a separate effort.