Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/Vocapia2Transcriber.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/Vocapia2Transcriber.groovy	(revision 2998)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/transcription/Vocapia2Transcriber.groovy	(revision 2999)
@@ -37,6 +37,7 @@
 		
 		boolean flagWord = false
 		def winfos = [:]
+		def turninfos = [:]
 		boolean other = false;
 		String word = ""
 		try {
@@ -92,9 +93,15 @@
 							
 							case "SpeechSegment": // <SpeechSegment ch="1" sconf="1.00" stime="9.94" etime="43.81" spkid="Enquêtrice" lang="fre" lconf="1.00" trs="1">
 								writer.writeStartElement("Turn")
-								writer.writeAttribute("speaker", parser.getAttributeValue(null, "spkid"))
-								writer.writeAttribute("startTime", parser.getAttributeValue(null, "stime"))
-								writer.writeAttribute("endTime", parser.getAttributeValue(null, "etime"))
+								
+								turninfos = ["speaker":parser.getAttributeValue(null, "spkid"),
+									"startTime":parser.getAttributeValue(null, "stime"),
+									"endTime":parser.getAttributeValue(null, "etime"),
+								]
+								for (String attr : turninfos.keySet()) {
+									writer.writeAttribute(attr, turninfos[attr])
+								}
+								
 								writer.writeCharacters("\n")
 								writer.writeStartElement("Sync")
 								writer.writeAttribute("time", parser.getAttributeValue(null, "stime"))
@@ -148,6 +155,13 @@
 								flagWord = false
 								word = word.trim()
 								if (word.startsWith("*")) {
+									//close current Turn and start a 'other' Turn
+									writer.writeEndElement() // current Turn
+									writer.writeStartElement("Turn")
+									writer.writeAttribute("speaker", "other")
+									writer.writeAttribute("startTime", winfos["time"])
+									writer.writeAttribute("orig-speaker", turninfos["speaker"])
+									writer.writeCharacters("\n")
 									other = true
 									word = word.substring(1)
 								}
@@ -155,6 +169,17 @@
 								String otherAttributeValue = Boolean.toString(other) // set now
 							
 								if (other && word.endsWith("*")) {
+									
+									//close the current 'other' Turn and restart the actual Turn
+									writer.writeEndElement() // current 'other' Turn
+									
+									writer.writeStartElement("Turn") // rebuild the orig Turn with its infos
+									turninfos["startTime"] = winfos["end"] // fix the startTime using the current word end time
+									for (String attr : turninfos.keySet()) {
+										writer.writeAttribute(attr, turninfos[attr])
+									}
+									writer.writeCharacters("\n")
+									
 									word = word.substring(0, word.length()-1)
 									other = false
 								}
@@ -178,14 +203,12 @@
 								
 								for (def punct : puncts) { // pre-retokenize if any
 									writer.writeStartElement("w")
-									writer.writeAttribute("time", winfos["time"])
-									writer.writeAttribute("start", winfos["start"])
-									writer.writeAttribute("end", winfos["start"])
+									for (String attr : winfos.keySet()) {
+										writer.writeAttribute(attr, winfos[attr])
+									}
 									writer.writeCharacters(punct)
 									writer.writeEndElement() // w
 									writer.writeCharacters("\n")
-									
-									
 								}
 							
 								puncts = []
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/RemoveSpeaker.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/RemoveSpeaker.groovy	(revision 2998)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/RemoveSpeaker.groovy	(revision 2999)
@@ -31,6 +31,7 @@
 import org.txm.scripts.importer.*;
 import org.txm.scripts.importer.graal.PersonalNamespaceContext
 import org.txm.utils.*;
+import org.txm.utils.xml.DomUtils
 import org.txm.metadatas.*;
 
 import java.io.File;
@@ -65,31 +66,36 @@
 	 * @param outfile the outfile
 	 * @param id the id
 	 */
-	public RemoveSpeaker(File transcriptionfile, File outfile, String id)
-	{
+	public RemoveSpeaker(File transcriptionfile, File outfile, String idRegex) {
 		System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl");
 				
 		this.outfile = outfile;
-		String xpathString = "//tei:u[@spk='"+id+"']";
+//		String xpathString = "//u";
 		//println "removing $xpathString in $transcriptionfile"
-		DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
-		//println "domFactory: $domFactory"
-		domFactory.setNamespaceAware(true); // never forget this!
-		domFactory.setXIncludeAware(true);
-		DocumentBuilder builder = domFactory.newDocumentBuilder();
+//		DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
+//		//println "domFactory: $domFactory"
+//		domFactory.setNamespaceAware(true); // never forget this!
+//		domFactory.setXIncludeAware(true);
+//		DocumentBuilder builder = domFactory.newDocumentBuilder();
 		//println "builder $builder"
-		doc = builder.parse(transcriptionfile);
+		//doc = builder.parse(transcriptionfile);
 		//println "doc $doc"
+		doc = DomUtils.load(transcriptionfile)
+		//def xpath = XPathFactory.newInstance().newXPath()
+//		xpath.setNamespaceContext(new PersonalNamespaceContext());
+		//def expr = xpath.compile(xpathString);
+		def nodes = doc.getDocumentElement().getElementsByTagName("u")
 		
-		def xpath = XPathFactory.newInstance().newXPath()
-		xpath.setNamespaceContext(new PersonalNamespaceContext());
-		def expr = xpath.compile(xpathString);
-		def nodes = expr.evaluate(doc, XPathConstants.NODESET);
+		def reg = /$idRegex/
 		
 		for (def node : nodes) {
-			//println "remove node "+node
-			Element elem = (Element)node;
-			elem.getParentNode().removeChild(node);
+			
+			//Element elem = (Element)node;
+			
+			String who = node.getAttribute("who") // [@who='"+idRegex+"']
+			if (reg.matches(who)) {
+				node.getParentNode().removeChild(node);
+			}
 		}
 		save()
 	}
@@ -99,8 +105,7 @@
 	 *
 	 * @return true, if successful
 	 */
-	private boolean save()
-	{
+	private boolean save() {
 		try {
 			// Création de la source DOM
 			Source source = new DOMSource(doc);
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/TranscriberTokenizer.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/TranscriberTokenizer.groovy	(revision 2998)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/TranscriberTokenizer.groovy	(revision 2999)
@@ -70,8 +70,7 @@
 	 * @param infile the infile
 	 * @param outfile the outfile
 	 */
-	public TranscriberTokenizer(File infile, File outfile, String lang)
-	{
+	public TranscriberTokenizer(File infile, File outfile, String lang) {
 		super(infile, outfile, lang)
 		txtname = infile.getName();
 		int idx = txtname.lastIndexOf(".")
@@ -96,15 +95,18 @@
 				audio = "present"
 			notation = s;
 			event = "";
-			
-			if (s.startsWith("\"")) {
-				rapp = true;
-				event += "#rapp1";
-			} else if(s.endsWith("\"")) {
-				rapp = false;
-				event += "#rapp2";
-			}
 
+			//TODO does not work (eg ' "word" '). This step should be done after the tokenizer step is done			
+//			if (s.startsWith("\"") && s.endsWith("\"")) {
+//				// not rapp1 or rapp2
+//			} else if (s.startsWith("\"")) {
+//				rapp = true;
+//				event += "#rapp1";
+//			} else if(s.endsWith("\"")) {
+//				rapp = false;
+//				event += "#rapp2";
+//			}
+
 			//test events
 			if (s.startsWith("^^")) {
 				event += "#orth";			
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/compiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/compiler.groovy	(revision 2998)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/compiler.groovy	(revision 2999)
@@ -90,7 +90,7 @@
 
 
 	/** The interviewers. */
-	ArrayList<String> interviewers = [];
+	def interviewers = null
 	static HashSet<String> sectionAttrs;
 
 	/** The anatypes. */
@@ -481,7 +481,7 @@
 							break;
 						case "w":
 						// concat spk id and ref
-							String isEnq = (interviewers.contains(u_name))?"*":"";
+							String isEnq = (interviewers != null && interviewers.matches(u_name))?"*":"";
 							String ref = (u_name+", "+formatedTime+""+isEnq)
 							if (ADD_TEXTID_TO_REF) ref = textid+", "+ref
 							vForm +="\t"+u_name+"\t"+ref
@@ -508,11 +508,10 @@
 								}
 							}
 
-
 							vForm = vForm.replaceAll("\n", "").replaceAll("&", "&amp;").replaceAll("<", "&lt;");
 
 							if (removeinterviewers) {
-								if (!interviewers.contains(u_name))
+								if (!interviewers.matches(u_name))
 									output.write(vForm+"\t"+wordid+vAna+"\n");
 							} else {
 								output.write(vForm+"\t"+wordid+vAna+"\n");
@@ -660,8 +659,8 @@
 
 						for (int i = 0 ; i < parser.getAttributeCount() ; i ++) {
 							list.add(new Pair(parser.getAttributeLocalName(i).replace("_","").toLowerCase(), parser.getAttributeValue(i)));
-							if (parser.getAttributeLocalName(i).startsWith("enq"))
-								interviewers.add(parser.getAttributeValue(i));
+							if (parser.getAttributeLocalName(i).equals("out-of-text-to-edit-locutor"))
+								interviewers = /${parser.getAttributeValue(i)}/;
 						}
 						return
 					case "Topic":
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/pager.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/pager.groovy	(revision 2998)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/pager.groovy	(revision 2999)
@@ -35,6 +35,7 @@
 import org.txm.importer.ApplyXsl2
 import org.txm.metadatas.MetadataGroup
 import org.txm.metadatas.Metadatas
+import org.txm.utils.TimeFormatter
 import org.txm.utils.io.FileCopy;
 
 
@@ -55,23 +56,23 @@
 	List<String> NoSpaceAfter;
 	
 	/** The pages. */
-	def pages = [];
-	def indexes = [];
+	def pages = []
+	def indexes = []
 	
 	/** The wordcount. */
-	int wordcount = 0;
+	int wordcount = 0
 	
 	/** The pagecount. */
-	int pagecount = 0;
+	int pagecount = 0
 	
 	/** The wordmax. */
-	int wordmax = 10;
+	int wordmax = 10
 	
 	/** The wordid. */
 	String wordid;
 	
 	/** The first word. */
-	boolean firstWord = true;
+	boolean firstWord = true
 	
 	/** The wordvalue. */
 	String wordvalue;
@@ -113,14 +114,14 @@
 	
 	File outfile;
 	
-	String corpusname ="";
+	String corpusname =""
 	String cuttingTag = "pb"
-	String txtname;
-	File htmlDir;
-	File defaultDir;
-	Metadatas metadatas;
+	String txtname
+	File htmlDir
+	File defaultDir
+	Metadatas metadatas
 	
-	def interviewers = [];
+	def interviewers = null
 	def eventTranslations = ["^^":"mot inconnu", "?":"orthographe incertaine",
 		"()":"rupture de syntaxe", "b":"bruit indéterminé",
 		"*":"mot corrigé",
@@ -133,12 +134,17 @@
 		"pif":"inaudible", "r":"respiration",
 		"rire":"rire du locuteur", "shh":"soufle électrique",
 		"sif":"sifflement du locuteur", "tx":"toux"];
-	String currentTime = "";
-	boolean bold = false;
-	int writenLength = 0;
-	boolean spokenTurn = false;
-	boolean firstSync = false;
-	boolean firstWho = false;
+	String currentUTime = ""
+	String startTimeSp = ""
+	String endTimeSp = ""
+	String startTimeU = "0"
+	String previousStartTimeU = "0"
+	boolean bold = false
+	int writenLength = 0
+	boolean spokenTurn = false
+	boolean firstSync = false
+	boolean firstWho = false
+	int nSilence = 0
 	/**
 	 * Instantiates a new pager.
 	 *
@@ -307,8 +313,8 @@
 									writer.writeEndElement(); // td
 								}
 								//get enqueteur to style their names
-								if (name.startsWith("enq")) {
-									interviewers.add(value)
+								if (name.equals("out-of-text-to-edit-locutor")) {
+									interviewers = /$value/
 								}
 								writer.writeEndElement(); // tr
 							}
@@ -493,10 +499,15 @@
 							firstWho = true;
 							spokenTurn = false;
 							overlapping = false
+							nSilence = 0 // will count the number of silence written to avoid writting [silence] at the sp end
 						
 							writer.writeStartElement("p");
 							writer.writeAttribute("class", "turn");
+							writer.writeCharacters("\n");
 						
+							this.startTimeSp = parser.getAttributeValue(null, "start")
+							this.endTimeSp = parser.getAttributeValue(null, "end")
+						
 							overlapping = ("true" == parser.getAttributeValue(null,"overlap"))
 							String spid = parser.getAttributeValue(null, "who");
 						
@@ -512,14 +523,22 @@
 							break;
 						case "u":
 							writer.writeCharacters("\n");
-							this.currentTime = parser.getAttributeValue(null,"time");
+							this.previousStartTimeU = this.startTimeU
+							this.startTimeU = parser.getAttributeValue(null, "start");
+							this.currentUTime = parser.getAttributeValue(null, "time");
 						
 							if (previousElem == "u" && writenLength == 0) { // if previous u had no words, it was a silence
+								def duration = ""
+								try {
+									def d = Float.parseFloat(this.startTimeU) - Float.parseFloat(this.previousStartTimeU)
+									duration = " "+TimeFormatter.formatTime(d);
+								} catch(Exception e) { e.printStackTrace()}
 								writer.writeStartElement("span");
 								writer.writeAttribute("class", "event");
-								writer.writeCharacters("[silence]");
+								writer.writeCharacters("[silence$duration]");
 								writer.writeEndElement(); // span
-								writer.writeEmptyElement("br");
+								nSilence++
+								//writer.writeEmptyElement("br");
 							}
 						
 							String spk = parser.getAttributeValue(null, "who")
@@ -534,6 +553,7 @@
 							previousSPK = spk
 							if (overlapping) previousSPK = null
 						
+							writenLength = 0;
 						//							writenLength = 0;
 						/*writer.writeStartElement("span");
 					 writer.writeAttribute("class", "sync");
@@ -652,10 +672,15 @@
 						case "sp":
 						//println "CLOSING: "+parser.getLocalName()
 							endBoldIfNeeded()
-							if (!spokenTurn) {
+							if (!spokenTurn && nSilence == 0) {
 								writer.writeStartElement("span");
 								writer.writeAttribute("class", "event");
-								writer.writeCharacters("[silence]");
+								String duration = ""
+								try {
+									def d = Float.parseFloat(endTimeSp)-Float.parseFloat(startTimeSp)
+									duration = " "+TimeFormatter.formatTime(d);
+								} catch (Exception e) {e.printStackTrace()}
+								writer.writeCharacters("[silence$duration]");
 								writer.writeEndElement();
 								writer.writeEmptyElement("br");
 							}
@@ -680,6 +705,7 @@
 						//writer.writeEndElement() // span@class=u
 						//writer.writeEmptyElement("br");
 						//if (overlapping) writer.writeEndElement(); // b
+							writer.writeCharacters("\n");
 							break;
 						case "event":
 							break;
@@ -694,9 +720,9 @@
 							spokenTurn = true;
 							int l = lastword.length();
 							String endOfLastWord = "";
-							if(l > 0)
+							if (l > 0) {
 								endOfLastWord = lastword.subSequence(l-1, l);
-						
+							}
 							if (interpvalue != null) {
 								interpvalue = interpvalue.replace("\"","&quot;");
 							}
@@ -726,16 +752,15 @@
 						
 							if (interpvalue.contains("rapp1")) {
 								writer.writeCharacters(" «");
-							} else if (wordvalue == "\"") {
-								// don't write this char
-							} else {
-								writer.writeStartElement("span");
-								writer.writeAttribute("class", "word");
-								writer.writeAttribute("title", interpvalue);
-								writer.writeAttribute("id", wordid);
-								writer.writeCharacters(wordvalue);
-								writer.writeEndElement();
-							}
+							} 
+						
+							writer.writeStartElement("span");
+							writer.writeAttribute("class", "word");
+							writer.writeAttribute("title", interpvalue);
+							writer.writeAttribute("id", wordid);
+							writer.writeCharacters(wordvalue);
+							writer.writeEndElement();
+						
 							if (interpvalue.contains("orth")) {
 								writer.writeStartElement("span");
 								writer.writeAttribute("class", "event");
@@ -748,9 +773,8 @@
 								writer.writeCharacters("_[!]");
 								writer.writeEndElement();
 							}
-						
 							if (interpvalue.contains("rapp2")) {
-								writer.writeCharacters(" » ");
+								writer.writeCharacters("» ");
 							}
 						
 							lastword=wordvalue;
@@ -817,9 +841,9 @@
 	private void writeCurrentTime() {
 		writer.writeStartElement("span");
 		writer.writeAttribute("class", "sync");
-		writer.writeCharacters(currentTime);
+		writer.writeCharacters(currentUTime);
 		
-		writeMediaAccess(currentTime)
+		writeMediaAccess(currentUTime)
 		
 		writer.writeEndElement() // span
 	}
@@ -838,11 +862,7 @@
 		
 		writer.writeStartElement("span");
 		writer.writeAttribute("class", "spk");
-		if(interviewers.contains(spk)) {
-			bold = true;
-		} else {
-			bold = false;
-		}
+		bold = interviewers != null && interviewers.matches(spk)
 		spk = spk.replaceAll('^([^0-9]*)([0-9]+)$', '$1 $2');
 		if (overlapping) {
 			writer.writeCharacters("// ")
@@ -876,46 +896,6 @@
 		}
 	}
 	
-	//	private String formatTime(float time, boolean doshort)
-	//	{
-	//		String rez = " ";
-	//		//		if(time >= 3600) // >= 1h
-	//		//		{
-	//		float h = time / 3600;
-	//		time = time%3600;
-	//		float min = (time%3600) / 60;
-	//		int sec = (int)time%60;
-	//
-	//		if(min < 10)
-	//			rez = ""+(int)h+":0"+(int)min;//+":"+time%60;
-	//		else
-	//			rez = ""+(int)h+":"+(int)min;//+":"+time%60;
-	//		//if (!doshort)
-	//		if (sec > 9)
-	//			rez += ":"+(int)time%60;
-	//		else
-	//			rez += ":0"+(int)time%60;
-	//		//		}
-	//		//		else if(time >= 60) // >= 1min
-	//		//		{
-	//		//			int min = time/60;
-	//		//			if(min < 10)
-	//		//				rez = "00:0"+min;//+":"+time%60;
-	//		//			else
-	//		//				rez = "00:"+min;//+":"+time%60;
-	//		//			if(!doshort)
-	//		//				rez += ":"+(int)time%60;
-	//		//		}
-	//		//		else // < 60
-	//		//		{
-	//		//			if(time < 10)
-	//		//				return " 0:0"+time;
-	//		//			else
-	//		//				return " 0:"+time;
-	//		//		}
-	//		return rez;
-	//	}
-	
 	/**
 	 * Gets the page files.
 	 *
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy	(revision 2998)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/transcriber/transcriberLoader.groovy	(revision 2999)
@@ -225,8 +225,8 @@
 					ArrayList<Pair<String, String>> metas = metadatas.get(filename)
 					//println "filename=$filename metas= $metas"
 					for (Pair p : metas) {
-						if (p.getFirst().startsWith("enq")) {
-							new RemoveSpeaker(infile, infile, p.getFirst())
+						if (p.getFirst().startsWith("out-of-text-to-edit-locutor")) {
+							new RemoveSpeaker(infile, infile, p.getSecond())
 						}
 					}
 				}
