From 9a3a50860701660fb18786bd91111e090fe911bd Mon Sep 17 00:00:00 2001 From: David Gonzalez Gandara Date: Sun, 29 Nov 2015 13:31:58 +0100 Subject: [PATCH] Package transcribe added --- packages/transcribe/transcribe.el | 124 ++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 packages/transcribe/transcribe.el diff --git a/packages/transcribe/transcribe.el b/packages/transcribe/transcribe.el new file mode 100644 index 000000000..85a11c22a --- /dev/null +++ b/packages/transcribe/transcribe.el @@ -0,0 +1,124 @@ +;;;transcribe.el --- package for audio transcriptions + +;;Copyright 2014 David González Gándara + +;;Author: David Gonzalez Gandara +;;version: 0.0.1 + +;;This program is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + + +;;;Commentary: + +;; +;; to install manually: +;; Copy this file to somewhere in your drive + +;; To load the file --> M-: (load "~/transcribe.el") --- change the route to where you copied the file + +;; Commands: +;; C-x C-n --> new episode structure +;; ----> New tag. Interactively insert new tag +;; C-x C-a ----> call interactively analyze_episodes.py to extract interactions by a person +;; C-x C-p ----> play audio file +;; ----> pause or play audio +;; C-x ----> seek 10 seconds forward +;; C-x ---->seek 10 seconds backward +;; ----> seek interactively: positive seconds go forward and negative seconds go backward +;; --------> l1 tag +;; --------> l2 tag + +;;;Code: + +(require 'emms-setup) +;(require 'emms-player-mpd) +;(setq emms-player-mpd-server-name "localhost") +;(setq emms-player-mpd-server-port "6600") + +(emms-standard) +(emms-default-players) +(require 'emms-player-mpg321-remote) +(push 'emms-player-mpg321-remote emms-player-list) + +(require 'emms-mode-line) +(emms-mode-line 1) +(require 'emms-playing-time) +(emms-playing-time 1) + +(global-set-key (kbd "C-x C-p") 'emms-play-file) + +(global-set-key (kbd "") 'emms-pause) + +(global-set-key (kbd "C-x ") 'emms-stop) + +(global-set-key (kbd "C-x ") 'emms-seek-forward) + +(global-set-key (kbd "C-x ") 'emms-seek-backward) + +(global-set-key (kbd "") 'emms-seek) + +(defun analyze-episode (episode person) + (interactive "sepisode: \nsperson:") + (shell-command (concat (expand-file-name "analyze_episodes2.py") " -e " episode " -p " person " -i " buffer-file-name ))) + +(global-unset-key (kbd "C-x C-A")) +(global-set-key (kbd "C-x C-A") 'analyze-episode) + +(defun draw-boxplot () + (interactive) + (shell-command (concat (expand-file-name "/usr/bin/Rscript ") "boxplot_students.R " buffer-file-name))) + +(global-unset-key (kbd "C-x C-B")) +(global-set-key (kbd "C-x C-B") 'draw-boxplot) + +(defun define-xml-tag (xmltag) + (interactive "stag:") + (insert (format "<%s>" xmltag xmltag)) + (backward-char 3) + (backward-char (string-width xmltag))) + +(defun xml-tag-l1 () + (interactive) + (insert "") + (backward-char 3) + (backward-char 2)) + +(defun xml-tag-l2 () + (interactive) + (insert "") + (backward-char 3) + (backward-char 2)) + +(fset 'xml-tag-l2-break "") +(fset 'set-attributes "clauses=\"1\" errors=\"0\"") + +(defun display-audio-info () + (interactive) + (emms-player-mpg321-remote-proc) + (shell-command "/usr/bin/mpg321 -R - &")) + + +(global-set-key (kbd "") 'define-xml-tag) +(global-set-key (kbd "") 'xml-tag-l2-break) +(global-set-key (kbd "") 'set-attributes) +(global-set-key (kbd "") 'xml-tag-l1) +(global-set-key (kbd "") 'xml-tag-l2) + +(fset 'NewEpisode + "\nDATE-NUMBER\n\n\nSubject (level)\n\n\tlow or high\nlow or high\nlow or high\r\nYes/no\n\n\n") + +(global-unset-key (kbd "C-x C-n")) +(global-set-key (kbd "C-x C-n") 'NewEpisode) + +;;;transcribe.el ends here \ No newline at end of file -- 2.39.2