Avoid breaking captions on periods following abbreviations.
shipped
Gabe Michalski
shipped
This issue was fixed in version 107! https://feedback.descript.com/changelog/release-version-107
Canny AI
Merged in a post:
Please add an option to turn off the automatic adding of a a break in caption after using a period. It's really annoying when you use abbreviations.
M
Moritz Hannen
The internet tells me it has already been reported and other people have the same issue:
Canny AI
Merged in a post:
caption beaks automatically after every .
M
Max
I've seen this complained about in reddit over 7 months ago and would be surprised if there wasn't a fix yet. After any . like in Dr. or a middle initial the captions are breaking. is there no way around this?
L
Liminality
The original request is from November 2020. It's now July 2024 and this is still a problem in Version 93.0.1.
It's quite frustrating for Descript to add a caption page-break between "vs." for instance. Or when typing "U.S. Citizen" or "St. Louis" or "Dr." "Mr." "Mrs." etc.... Descript really allows some nice caption customization, but this default behavior is like throwing a wrench into the works.
Canny AI
Merged in a post:
Captions - Period override with titles, middle initials, and abbreviations
L
Lamonte Gwynn
There is an AI program called Descript. It takes video and automatically turns the audio into a written script. A user can then take the script and create captions. The issue is when the AI creates the captions, it will create a new caption at the period in the sentence. The problem is when abbreviated titles and name middle initials are in the script, the AI will create a break in the caption and separate names at the titles and middle initials. My thought is there should be code that can be put into the program that would override the break if a short key is activated at the period at titles and middle initials. Can you write code that could be put into the program?
ChatGPT
Certainly! For such a program, you'd likely want to implement post-processing logic on the AI-generated text. Given that "Descript" is proprietary software, I can provide a generic approach in JavaScript, which you can then adapt into the specific software environment of Descript if they offer a programmable API or SDK.
This solution will focus on the text processing part: analyzing the generated text and determining whether a period should represent the end of a caption or should be treated as part of an abbreviation or middle initial. If a user activates a shortcut key, we'll mark that period as "safe" and avoid breaking the caption there.
Here's a conceptual implementation:
javascript
Copy code
let overridePeriods = [];
document.addEventListener('keydown', (e) => {
// Check for the "command + ?" key combination
if (e.metaKey && e.key === '?') {
const position = getCurrentCursorPosition(); // This function should return the current cursor position in the script
overridePeriods.push(position);
}
});
function processCaptions(rawScript) {
const safeBreakPoints = getSafeBreakPoints(rawScript);
const captions = [];
let startIdx = 0;
for (let i = 0; i < rawScript.length; i++) {
if (rawScript[i] === '.' && !safeBreakPoints[i]) {
captions.push(rawScript.substring(startIdx, i + 1).trim());
startIdx = i + 1;
}
}
// Handle any remaining text
if (startIdx < rawScript.length) {
captions.push(rawScript.substring(startIdx).trim());
}
return captions;
}
function getSafeBreakPoints(script) {
// This function will return an array where a
true
at index i
means the period at that position should not break the caption.const breakPoints = Array(script.length).fill(false);
// Handling user-overridden periods:
overridePeriods.forEach(pos => {
if (script[pos] === '.') {
breakPoints[pos] = true;
}
});
// Handle common abbreviations and initials. Add more as needed.
const abbreviations = ['Mr.', 'Mrs.', 'Dr.', 'Ms.', 'St.', 'Ave.']; // Add more as needed
abbreviations.forEach(abbrev => {
let idx = script.indexOf(abbrev);
while (idx !== -1) {
breakPoints[idx + abbrev.length - 1] = true; // Marking the period in the abbreviation as safe
idx = script.indexOf(abbrev, idx + 1);
}
});
return breakPoints;
}
This is a high-level conceptual solution. Integrating this into Descript or any other proprietary software would require access to their development tools and a deep understanding of their internal data structures and functionalities.
Canny AI
Merged in a post:
New sentence after period
Rob Matsushita
Is there a way to use a period without it triggering a new paragraph or sentence, like when you use abbreviations? If I use "Mr." it breaks up the sentence in a way that looks bad, like:
It's been a long time, Mr.
Veil.
Canny AI
Merged in a post:
No periods after titles like Mr Mrs Ms
Brian Boyle
Omit the period as it causes captions to start as a new sentence. In order to avoid that you have to tediously remove the period. But that then lower cases the name. So then you have to correct that.
Much easier to just remove the period, and then in the few cases you want it, you can add it much easier than removing it now.
Jeremy Andrew Davis
This! We need a better way of breaking caption lines than periods. Sometimes I want the caption to continue after a period or like you said, with an abbreviation. Descript makes you type "US" instead of U.S. but this is not proper accessible format because it can be misread as "us" but with emphasis.
Gabe Davis
This technically different unicode character works as a replacement for a period, and pasting it in is working as a stopgap for me until this feature finally gets implemented.
Micheal Green
Yes! We also have this problem all the time. I end up having to export an SRT file and do it manually. Sort of a silly oversight.
Load More
→