saurabhshri / CCAligner

🔮 Word by word audio subtitle synchronisation tool and API. Developed under GSoC 2017 with CCExtractor.
165 stars 33 forks source link

Invalid JSON #89

Open aolney opened 5 years ago

aolney commented 5 years ago

A few small changes appear to be needed:

  1. escape double quotes in subtitle
  2. add commas between subtitle objects

Example:

"subtitles": [ { "subtitle" : "<font size=:exclamation:"24":exclamation:>Announcer: AND NOW A FIRESIDE CHAT", "edited_text" : "AND NOW A FIRESIDE CHAT", "start" : "3103", "end" : "5606", "words" : [ { "word" : "AND", "recognised" : "0", "start" : "3103", "end" : "3133", "duration" : "30" }, { "word" : "NOW", "recognised" : "1", "start" : "3133", "end" : "3693", "duration" : "560" }, { "word" : "A", "recognised" : "1", "start" : "3703", "end" : "3793", "duration" : "90" }, { "word" : "FIRESIDE", "recognised" : "1", "start" : "3803", "end" : "4313", "duration" : "510" }, { "word" : "CHAT", "recognised" : "1", "start" : "4323", "end" : "4603", "duration" : "280" } ], "phonemes" : [ ] }:exclamation: {

saurabhshri commented 5 years ago

Hi, thanks for catching this! :) Would you like to send a PR?

aolney commented 5 years ago

Unfortunately I blew my code away later in the summer to free up disk space. So to do this would require complete recreation.

saurabhshri commented 5 years ago

No issues @aolney , thanks for reporting this!