{"action":"created","issue":{"url":"https://api.github.com/repos/marytts/marytts/issues/400","labels_url":"https://api.github.com/repos/marytts/marytts/issues/400/labels{/name}","comments_url":"https://api.github.com/repos/marytts/marytts/issues/400/comments","events_url":"https://api.github.com/repos/marytts/marytts/issues/400/events","html_url":"https://github.com/marytts/marytts/issues/400","id":107683002,"number":400,"title":"Skip words from transcript/audio","user":{"login":"entenbein","id":13657956,"avatar_url":"https://avatars.githubusercontent.com/u/13657956?v=3","gravatar_id":"","url":"https://api.github.com/users/entenbein","html_url":"https://github.com/entenbein","followers_url":"https://api.github.com/users/entenbein/followers","following_url":"https://api.github.com/users/entenbein/following{/other_user}","gists_url":"https://api.github.com/users/entenbein/gists{/gist_id}","starred_url":"https://api.github.com/users/entenbein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/entenbein/subscriptions","organizations_url":"https://api.github.com/users/entenbein/orgs","repos_url":"https://api.github.com/users/entenbein/repos","events_url":"https://api.github.com/users/entenbein/events{/privacy}","received_events_url":"https://api.github.com/users/entenbein/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/marytts/marytts/labels/question","name":"question","color":"cc317c"},{"url":"https://api.github.com/repos/marytts/marytts/labels/voicebuilding","name":"voicebuilding","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-22T10:11:36Z","updated_at":"2015-09-22T11:56:41Z","closed_at":null,"body":"Hi folks, \r\n\r\nI'd like to skip a word from the script as well as the part (because it was read/pronounced in a way that doesn't comply with my phoneset, or something different was read) of the audio when processing a particular sentence. By, let's say, marking that word with a *#skip#' or some other distinctive tag.\r\n\r\nSo in\r\n\r\n*This is such a sentence#skip# where I'd like to skip a word.*\r\n\r\nonly \r\n\r\n*This is such a where I'd like to skip a word.*\r\n\r\nshould be processed. Is that possible without altering the audio file?\r\n\r\nI gave it a try and added some code to *marytts-languages/marytts-lang-[lang]/src/main/java/marytts/language/[lang[/JTokeniser.java*'s **tokenizerFixes** class:\r\n\r\n```\r\nprotected void tokenizerFixes(MaryData d) {\r\n\t\tDocument doc = d.getDocument();\r\n\t\tNodeIterator ni = ((DocumentTraversal) doc).createNodeIterator(doc, NodeFilter.SHOW_ELEMENT, new NameNodeFilter(\r\n\t\t\t\tMaryXML.TOKEN), false);\r\n\t\tElement t = null;\r\n\t\twhile ((t = (Element) ni.nextNode()) != null) {\r\n\t\t\tString s = MaryDomUtils.tokenText(t);\r\n//-----------------------------------------------------------------------\r\n\t\t\tif (s.contains(\"#skip#\")){\r\n\t\t\t\tSystem.out.println(\"Delete word from sentence: \" + s);\r\n\t\t\t\tt.getParentNode().removeChild(t);\r\n\t\t\t\tdoc.normalize();\r\n\t\t\t\tcontinue;\r\n\t\t\t} \r\n//------------------------------------------------------------------------\r\n[...]\r\n\r\n```\r\nAnyway, that doesn't seem to be enough.\r\n\r\nAny suggestions?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/marytts/marytts/issues/comments/142265898","html_url":"https://github.com/marytts/marytts/issues/400#issuecomment-142265898","issue_url":"https://api.github.com/repos/marytts/marytts/issues/400","id":142265898,"user":{"login":"psibre","id":1278639,"avatar_url":"https://avatars.githubusercontent.com/u/1278639?v=3","gravatar_id":"","url":"https://api.github.com/users/psibre","html_url":"https://github.com/psibre","followers_url":"https://api.github.com/users/psibre/followers","following_url":"https://api.github.com/users/psibre/following{/other_user}","gists_url":"https://api.github.com/users/psibre/gists{/gist_id}","starred_url":"https://api.github.com/users/psibre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psibre/subscriptions","organizations_url":"https://api.github.com/users/psibre/orgs","repos_url":"https://api.github.com/users/psibre/repos","events_url":"https://api.github.com/users/psibre/events{/privacy}","received_events_url":"https://api.github.com/users/psibre/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T11:56:41Z","updated_at":"2015-09-22T11:56:41Z","body":"I'm not sure if this answers your question, but there is a hidden \"feature\" that allows you to override the AllophonesGenerator component for selected utterances by providing the `ALLOPHONES` MaryXML youself. To do this, just place the corresponding files under `rawmaryxml` in your voicebuilding directory."}}