[ANSWERED] Splitting a text paragraph into sentences
-
Hey,
I'm trying to build a surtitle/teleprompter system for a show atm and want to use a data array actor reading an excel spreadsheet with the script in it. The two systems should be linked so that the surtitle system breaks down a paragraph into X lines (depending on length), that are individually cued, while the teleprompter system only updates when the surtitles system finished the whole paragraph.
I was gonna use a text chopper actor to split up the lines from the paragraph but I just ran into the issue that the tab separated values sheet converts line breaks into double spaces or something that the text chopper actor doesn't recognize.
Is there a way for an actor to receive a paragraph of several sentences, recognize a character (say a dot "."), and split up the paragraph into the individual sentences?
Thanks for your help in advance.
-
Perhaps the solution is not in how you deal with the data in Isadora, but how you present the data to Isadora?
Perhaps using a text editor like Notepad++ you can edit the tab separated values file to replace the line breaks with something the text chopper actor does recognise?
Perhaps the text formatter actor is your friend here?
[I've been doing a similar thing myself, creating captions for a show, but the director very clear on how he wanted things formatted, and how many lines grouped together, etc. So I put each line of text in a column of a spreadsheet so that the data array actor saw each line as a separate string. I then used the text formatter actor to put each string on a separate line in the text draw actor.
The director also wanted all the captions to be centered on screen, so I used excel to count the number of 'lines' in each caption, and brought that data as a value into the data array, and that value was linked to the input of a selector actor giving on offset value to the vertical position in the text draw actor ensuring each caption was centred no matter it it had one, two, three of four lines
When I've got this show up and running I'll share a fully commented version of the patch here, but that won't be for a few days yet] -
In case you are not aware, Isadora has a SRT player available in the Addons.
I have found working in http://www.aegisub.org/ and using the SRT actor to work rather well.
-
Thank you for the advice! I did end up solving the issue by separating the lines in google sheets using an expression i found and bringing them in as individual colums, I assume like you have done before, and it's working great!
I do have a follow-up question. There are some reoccurring stage directions that describe the sounds playing from the sound design (for deaf audience members), and each of them triggers a corresponding animation. What I'm trying to achieve is to recognize these stage directions (they look like this: "[Sound: Comedic SPLASH]") and replace those words with "Splash" as well as send a 1-10 value to activate the relevant animation in a little movie player system. I thought that the cleanest way was to use the javascript actor, but i think that my entry level JS knowledge has gotten a little rusty. Is there a glaring mistake I'm making based on the picture attached?
screen-shot-2023-01-27-at-3.38.02-pm.png
That's very good to know I have a project coming up where I will certainly use this! For this project I unfortunately can't rely on it being timecoded and need individual triggers.
-
You will need to reference the incoming values by the arguments list. The names you give for the inputs and outputs in the comments do not effect the code names.
So 'iz_input 1' needs to be referenced as arguments[0]
The test you are performing is using the single = sign, which is used for assignment.. to test if it is equal you need == or === (3 is more strict)
However, in this case, you might benefit from a javascript string function to test if a sub-string is contained in the string. see: https://www.w3schools.com/jsre...
-
funnily enough I am just sitting in an audience to watch a show made by and designed for hearing impaired audiences, waiting for it to atartThe solution to your problem is to add an extra column to your spreadsheet, and put in a value each time you want the animation to show. This value goes into the date array and can use a selector or comparator actor linked to a trigger to fire the animation. Does that make sense?! Curtains up, gotta go!
-
aah yes that worked well! Thank you for the help!