mysociety / sayit Goto Github PK
View Code? Open in Web Editor NEWSayIt - a component for recording and storing public statements.
Home Page: http://sayit.mysociety.org/
License: Other
SayIt - a component for recording and storing public statements.
Home Page: http://sayit.mysociety.org/
License: Other
e.g. when choosing "Save and add a new speech" from speech form, or "Create new speech in section" from section actions.
Except the time, which will have moved on (presumably). But date, location etc should all be the same.
If the audio is uploaded with JavaScript, we can presumably start the transcription then, and then when they submit the rest of the form, go straight to the edit form (if transcription done quickly enough), or the please wait page as now if it's still processing.
(If it's really quick, it could get the transcription and insert into the form before they submit it, I guess, but probably not worth doing that.)
Currently, when you click 'add a new speech' the site shows you a page which says:
"Do you have Audio to upload, Text to enter, or Both?"
In future the option to upload audio should happen on the same page as the text authoring page - they shouldn't be different pages.
Currently is just recent speeches, should include recent debates and a list of all speakers for the moment.
Now, is "recent" in "recent debates" by added to site, or date of speeches within them? Both? All speakers sounds like might be a lot.
Requires mysociety/popit-django#11 . Just HTML width/height for different sizes now, and we'll then think about an image proxy at some later point. The photo should default to the current missing person image, and should work with the coloured borders appropriately.
There's /sections for listing root sections, and then /sections/ for listing a particular section (and its speeches and descendants/ancestors). This should really just be the same code.
Currently it's a django management command to pull in popit data. A form to provide a popit URL that pulls it in (async?).
Though if someone uses external video, e.g. YouTube, presumably just want to embed. Might want to embed audio too, of course.
basically, a user should be able to scan down a list of statements, see a problem and go into edit mode in one click.
(MS: Perhaps with the icon-edit icon.)
Can be done in Django admin currently. Presumably could allow editing of popit-imported ones too, but have them overridden by a new import?
It works okay for now, but I guess the first call to get_descendants gets all the data necessary from the database, so it should be possible to do what get_ancestors does without it calling the db again.
To make them look more like a debate
Have a player, same as one on speech pages, on the /recordings/[ID] page that lets someone play back the entire uploaded recording.
This should be done in speeches/tasks.py but sometimes it is not caught.
An instance can have a description; each section could usefully have one too (this could be markdown, to enable links to e.g. agendas elsewhere). This could also provide credit to the person who uploaded/transcribed the material (thanks Richard for the suggestion).
Currently you need to have created a section in order to properly catalogue a speech. It would be great to be able to add these on the fly as I'm adding a speech.
e.g. import from a youtube URL?
(Yes, this ticket comes from my use-case of familiarizing self with transcription process by transcribing a Youtube video... are members of public who record meetings likely to upload video to YouTube? or audio to Soundcloud/audioboo etc.?)
As that'll be nicer.
"Obviously there are cases where >1 person is quoted in a source URL but i would like to see the speeches listed so that I can verify the speakers referenced and amend if necessary."
Currently, /recordings/[ID] displays a list of the timestamps for a recording, links to the speeches created as a result of the recording upload, and lets you assign all the speeches of a recording to a section.
Need to work out which fields can be queried on and add them to the API fields.
Otherwise a huge file uploaded could cause ffmpeg to do loads of work splitting it up and the app might timeout waiting for a response (as well as hanging the server, although it'll do that anyway when celery does it if that's the case)
The popit tables will be shared amongst instances, but need separate Speakers for each instance.
Similar to NASA's TEC, as cleaned up for Spacelog, e.g. https://github.com/Spacelog/Spacelog/blob/master/missions/a11/transcripts/TEC
Should we provide guidance on e.g. transcribing audio/video into a text file or spreadsheet (time/speaker name/text at its simplest), and then have an import for that?
If you have a page of speeches (by a particular speaker, most recent, or whatever), it'd be nice to show the ancestry of each speech, ie. all the sections that lead down to that speech. But calling get_ancestors on each one in turn is relatively slow (c 0.01s per row, doesn't appear to be in the db lookup which is <1ms, hmm). Need to either find out why it's slow and speed it up, make one call to get all the ancestors and match them up to the items in code, or something else.
Might as well do this sooner rather than later. Make sure it's optional to be tied to a popit person.
This (title, description, creator) can be done via Django admin interface manually, which is fine for our current purposes. Front end for editing by authed users to be done later.
Sections are listed by time of Speeches under them if there are any times, falling back to Section insertion (ID) order. This works okay, but you might want to e.g. insert two sets of same-date written answers (each a separate Section containing question and answer) to a particular department and have all topics listed in alphabetical order, not insertion order.
To consider - order_with_respect_to (adds column, manual (re)ordering then possible); a flag on Section to say "order its children this way" (dunno if recursive query will make that tricky, but current ordering is done in python after fetching anyway).
Links with #5, which might be better.
When I activate the speaker name field on the new speech page, and press 'r' , the first name it shows me doesn't start with 'r'. Only typing 'ro' brings up the name (robert) that I was expecting
Currently, a speech with no speaker is treated as narrative - we need to distinguish between "unknown speaker" and "no speaker" in some way. A flag/tag on a particular speaker to treat as "Unknown", or a flag on a speech to mark as procedural?
If you're writing a whole debate's worth of speeches, you want as much as possible set up from one speech form to the next. All that's probably going to change is time, speaker, and text - prioritise these three (guess time based on size of previous speech? Guess speaker based on dialogue?), default others, move some to section?
If I start to author a new statement, which belongs to a speaker not known to the instance, there should be nice workflow to create the new speaker within the same page.
If a user has just created a new section manually, it's likely they're going to want to then add some statements. So having pressed 'create' they should see the title of theirs section, with a prominent 'start adding statements' button in the middle of the page.
Visible to logged in users only
An API to retrieve sections of an instance, their subsections, (parent?), and so on.
e.g. http://www.amara.org/en/ can export in a variety of formats - if someone has used this to caption a video, someone could upload this and be given an interface to e.g. assign speakers and a section.
#31 lets you edit the recording timestamps, but not create/remove any.
Add the ability to insert a new RecordingTimestamp at any point among the other timestamps. This will then create a new Speech.
Also allow a RecordingTimestamp to be removed, which should then remove the associated Speech.
When you've uploaded an audio and it's been split into speeches, you might well want to put all those speeches in the same (possibly new) Section. Need to have some interface that makes that easier/easy, and for in general if possible.
Should uploaded audio create a root Section and put a group in there? Too many root sections in that case? Would mean you just need to add/change the parent of the Section (assuming you have a structure already). @mhl any thoughts?
To go with next/previous sections.
Location is currently just a field on speeches, and should probably be handled differently.
Requires mysociety/popit-django#11 .
Perhaps have an optional table to provide a name for a particular depth of Section tree (e.g. "Day", "Department", "Play").
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.