Reply to post

@Voice skipped to speech a whole Thai paragraph

Author
Sorawut
User
  • Total Posts : 0
  • Reward points: 0
  • Joined: 2019/01/21 07:50:55
  • Status: offline
2019/05/16 00:22:51 (permalink)

@Voice skipped to speech a whole Thai paragraph

Hi,
 
I have encountered this issue with this paragraph.
และคุณรู้ไหมว่าเมืองไทยก็มีหลักสูตรวิชา “การตายอย่างมีคุณภาพ” (Beautiful Death) เปิดสอนที่จุฬาลงกรณ์มหาวิทยาลัย ตั้งแต่ปี 2559 (ก่อนหน้านั้นคือ วิชามรณะศึกษา) สอนโดย “ร.ศ.ดร.เอมอัชฌา วัฒนบุรานนท์” วิชานี้ไม่เกี่ยวกับศาสนาแต่เป็นเรื่องของการใช้ชีวิต เพื่อให้ผู้เรียนได้เรียนรู้และเอาไปประยุกต์ใช้ในชีวิตประจำวันได้จริง จุดมุ่งหมายคือให้ทุกคนได้ทำความเข้าใจกับความตายและยอมรับให้ได้เมื่อต้องเผชิญความตาย โดยพูดในมิติของชีวิต การแพทย์ กฎหมาย และสังคม และหากขยับเข้าไปใกล้กับเรื่องของ ‘ไลฟ์สไตล์’ แทบไม่น่าเชื่อว่าตอนนี้บ้านเราก็มี Death Concept Café&Restaurant คือการหยิบความตายมาตีความออกเป็น Business

 
My environment.
@Voice v16.8.2
 
"Sync articles with Pocket" with this link
https://www.facebook.com/LOCALRY/posts/629126144181642
 
replace-tha.txt
*"View Edit History|Code:|โดย ชัชวนันท์ Club VI|Tam-eig|เช้าตรู่ ส่งถึงมือคุณ|>#<.+>FutureTrends<.+>Futureisnow<" ""
*"----- .+ -----|=(=)+|#(#)+|_(_)+|-(-)+|~(~)+|<(<)+|>(>)+|>(>)+|\.(\.)+|\*(\*)+|…" ""
*"(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))" "URL"
*"<img.+" ""
*"[:upper:]{5,}" "A->a"
*"[^A-Za-z][A-Z][A-Za-z]+[A-Z][^A-Za-z]" "a->A"
*"\s*([0-9]+)[.)]([^0-9])" "$1$2"
*"\s*ณ\." "นะ"
*"\s*ๆ\s*" "ๆ"
*"([0-9,]+)\.([0-9]+)" "$1จุด$2"
*"\s*\(" "วงเล็บ"
*"\)\s*" "วงเล็บ"
"#" "hash tag"
"Anchor" "แองเคอ"
"Bias" "ไบแอ๊ส"
"Buffett" "บัฟเฟ็ด"
"Cheer" "เชียร์"
"Cholesterol" "คลอเรสเตอรอล"
"Coup d”etat" "Coupเดท่า"
"Debate" "ดีเบต"
"Dividend" "ดีวิเด็น"
"Domestic" "โดเมสติก"
"Dr." "Doctor"
"EPS" "e p s"
"Fasting" "ฟาสติ้ง"
"Franchise" "แฟรนไชส์"
"IoT" "i o t"
"Jr" "Junior"
"Lao" "ลาว"
"Live" "ไลฟ์"
"Mr" "Mister"
"NGO" "n g o"
"Pseudo" "ซูโด "
"QoQ" "Q O Q"
"WACC" "ดับบิว a c c"
"YoY" "Y O Y"
"ก.พ" "กุมภาพันธ์"
"กเ" "ก เ"
"กง่" "ก ง่"
"กสทช" "ก ส ท ช "
"ก็อด" "ก็ อด"
"การ" "กาณ"
"เคารพ" "เคา รพ"
"โครต" "โคตร"
"งบา" "ง บา"
"งยา" "ง ยา"
"งเล" "ง เล"
"ดน้" "ด น้"
"ดมา" "ด มา"
"ดิบดี" "ดิบ ดี"
"โดรน" "Drone"
"ต.ค" "ตุลาคม"
"ตป" "ต ป"
"นทา" "น ทา"
"บนอ" "บ นอ"
"ปกติ" "ปกกะติ"
"ผบห" "ผู้บริหาร"
"ศก." "เศรษฐกิจ "
"ศนา" "ศ นา"
"สนุ่" "ส นุ่"
"สมก" "สะมะก"
"สิเ" "สิ เ"
"หลอล" "หล อล"
"อดอ" "อด อ"
"อนอ" "อ นอ"
"อเนจอนาถ" "อเนจ อนาถ"
"อมอก" "อม อก"
"อสมท" "อ ส ม ท"
*" EV|ev([^A-Za-z])" " อีวี$1"
*" PE|pe([^A-Za-z])" " พีอี$1"
*"([A-Za-z])science" "$1 science"
*"(บ|น)อย่า" "$1 อย่า"
*"5{3,}" "ห้าห้าห้า"
*"ก(รก|\.)(ฎ|ฏ)(า|\.)" "กรกฎา"
*"คห(ส|ล)ต" "ความเห็นส่วนตัว"
*"ถ{3,}" "ถ ถ ถ"
*"อ\.\s*" "อาจารย์"
*"([ก-๛>])\s+([ก-๛<])" "$1$2"

 
Thank you,
 

10 Replies Related Threads

    Admin
    Administrator
    • Total Posts : 275
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: @Voice skipped to speech a whole Thai paragraph 2019/05/16 05:20:25 (permalink)
    I copied this Facebook link and pasted into @Voice, it reads fine this paragraph. Most likely your speech replacements cause the trouble. Please enter "Edit speech" function and disable all replacements, then test reading this article again. If it works fine, you could re-enable your replacements in smaller groups and test, until you find the one that causes the problem, and delete or correct it.
     
    If speech replacements are not the problem, maybe the article is somehow extracted differently when downloaded from Pocket. I cannot access your Pocket account to download it in the same way, so please locate this article file (it will be some title, and ending with .html, in the Pocket sub-directory of the main @Voice app folder) and send it to my email attachment. I could then test to see what else is going on there.
     
    Also a question for you. It seems that in this article @Voice thinks that the entire paragraphs are single sentences. The dots are inserted between paragraphs. Is this a normal way of writing in Thai? Do you use some other character to end sentences in your language?
     
    Greg
    Admin
    Administrator
    • Total Posts : 275
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: @Voice skipped to speech a whole Thai paragraph 2019/05/16 05:27:00 (permalink)
    FYI, I also saved this article to my Pocket account, then downloaded it (with @Voice "Advanced sync" method), it still reads this paragraph fine, does not skip.
     
    Sorawut
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2019/01/21 07:50:55
    • Status: offline
    Re: @Voice skipped to speech a whole Thai paragraph 2019/05/16 07:40:59 (permalink)
    I have done it. It worked fine with these 3 disables.
     
    *"\s*\(" "วงเล็บ"
    *"\)\s*" "วงเล็บ"
    *"([ก-๛>])\s+([ก-๛<])" "$1$2"
     
    Also a question for you. It seems that in this article @Voice thinks that the entire paragraphs are single sentences. The dots are inserted between paragraphs. Is this a normal way of writing in Thai? Do you use some other character to end sentences in your language?

    I think space is the character to end a sentence but it used like "," ";" also. :P
    post edited by Sorawut - 2019/05/16 08:05:08
    Sorawut
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2019/01/21 07:50:55
    • Status: offline
    Re: @Voice skipped to speech a whole Thai paragraph 2019/05/16 08:14:24 (permalink)
    Actually below is the whole paragraph but @Voice stopped speech at "... Business" then started another with "Model ...".
     
    Is that about Google TTS limitation?
     
    BTW, could you catch then show an error caused by Edit speech rather than skip it?

    และคุณรู้ไหมว่าเมืองไทยก็มีหลักสูตรวิชา “การตายอย่างมีคุณภาพ” (Beautiful Death) เปิดสอนที่จุฬาลงกรณ์มหาวิทยาลัย ตั้งแต่ปี 2559 (ก่อนหน้านั้นคือ วิชามรณะศึกษา) สอนโดย “ร.ศ.ดร.เอมอัชฌา วัฒนบุรานนท์” วิชานี้ไม่เกี่ยวกับศาสนาแต่เป็นเรื่องของการใช้ชีวิต เพื่อให้ผู้เรียนได้เรียนรู้และเอาไปประยุกต์ใช้ในชีวิตประจำวันได้จริง จุดมุ่งหมายคือให้ทุกคนได้ทำความเข้าใจกับความตายและยอมรับให้ได้เมื่อต้องเผชิญความตาย โดยพูดในมิติของชีวิต การแพทย์ กฎหมาย และสังคม และหากขยับเข้าไปใกล้กับเรื่องของ ‘ไลฟ์สไตล์’ แทบไม่น่าเชื่อว่าตอนนี้บ้านเราก็มี Death Concept Café&Restaurant คือการหยิบความตายมาตีความออกเป็น Business Model อย่างคาเฟ่มรณานุสติ “KID MAI DEATH” ที่มีจุดมุ่งหมาย เพื่อกระตุ้นให้คนฉุกคิดถึงความตายและใช้ชีวิตโดยไม่ประมาท อีกที่คือ “ร้านข้าวต้มปลง” ที่ออกแบบและตกแต่งร้านออกมาในธีมงานศพ ต้นขั้วไอเดียเกิดจากตัวเจ้าของที่เคยเฉียดเข้าใกล้ความตายจนตกตะกอนแนวคิดบางอย่างออกมาได้ และมองความตายใหม่ในมุมที่ต่างออกไป 

    Admin
    Administrator
    • Total Posts : 275
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: @Voice skipped to speech a whole Thai paragraph 2019/05/18 08:28:20 (permalink)
    The app is dividing longer paragraphs of text into sentences (using the characters like . ! ?) and sending one sentence at a time to the speech engine. Since there are no such characters in the paragraph above, it treats it as one sentence, but it's too long (some speech engines are limited to about 500 characters of text that can be sent to it at one time). So if there is no full stop or other character ending sentence, it tries to divide text at the nearest comma, dash or semicolon, if that is not found - at a nearest space character.
     
    I tested the paragraph from your previous post, and it had to make a break between Business and Model words, so it sounds like there is a sentence end there (brief pause), but then it continues reading the rest of the text.
     
    I really don't know what would be the best text splitting algorithm for Thai text. I cannot split on every space in the above text sample, because we'd have a lot of "sentences" then like "(Beautiful.", "Death).", "Business.", "Model." etc.
     
    Greg
    Sorawut
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2019/01/21 07:50:55
    • Status: offline
    Re: @Voice skipped to speech a whole Thai paragraph 2019/05/20 01:14:19 (permalink)
    I am sorry. Last time I copied wrong "replace-tha.txt". The correct one is below.


    *"added a new photo to the|Sent via Hermit • https://hermit.news|โดย ลงทุนแมน|View Edit History|Code:|โดย ชัชวนันท์ Club VI|Tam-eig|เช้าตรู่ ส่งถึงมือคุณ" ""
    *"----- [^-]+ -----|~|=(=)+|#(#)+|_(_)+|-(-)+|~(~)+|<(<)+|>(>)+|>(>)+|\.(\.)+|\*(\*)+|…" ""
    *"(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))" "URL"
    *"<img.+</img>" "" 256
    *"<span style=[^>]+>" ""
    *"[:upper:]{5,}" "A->a"
    *"[^A-Za-z][A-Z][a-z]+[A-Z][^A-Za-z]" "a->A"
    *"\s*(\d+)[.)](\D)" "<break time=""100ms""/>$1<break time=""200ms""/>$2"
    *"\s*ณ\." "นะ "
    *"\s*ๆ\s*" "ๆ"
    *"([0-9,]+)\.(\d+)" "$1จุด$2"
    *"\s*\(" "<break time=""100ms""/>วงเล็บ "
    *"\)\s*" "<break time=""200ms""/>"
    *"(^|\D\s)([ก-ฮ])([ก-ฮ])([ก-ฮ]?)([ก-ฮ]?)([ก-ฮ]?)(\s|$)" "$1 $2 $3 $4 $5 $6 $7"
    *"([ก-ฮ])([ก-ฮ])([ก-ฮ])([ก-ฮ]?)([ก-ฮ]?)\." "$1 $2 $3 $4 $5 "
    "#" "hash tag"
    "Anchor" "แองเคอ"
    "Bias" "ไบแอ๊ส"
    "Buffett" "บัฟเฟ็ด"
    "Cheer" "เชียร์"
    "Cholesterol" "คลอเรสเตอรอล"
    "Coup d”etat" "Coupเดท่า"
    "Debate" "ดีเบต"
    "Dividend" "ดีวิเด็น"
    "Domestic" "โดเมสติก"
    "Dr." "Doctor"
    "Fasting" "ฟาสติ้ง"
    "Franchise" "แฟรนไชส์"
    "IoT" "i o t"
    "Jr" "Junior"
    "Lao" "ลาว"
    "Live" "ไลฟ์"
    "Mr" "Mister"
    "Pseudo" "ซูโด "
    "WACC" "ดับบิว a c c"
    "ก.พ" "กุมภาพันธ์"
    "กเ" "ก เ"
    "กง่" "ก ง่"
    "ก็อด" "ก็ อด"
    "การ" "กาณ"
    "เคารพ" "เคา รพ"
    "โครต" "โคตร"
    "งบา" "ง บา"
    "งยา" "ง ยา"
    "งเล" "ง เล"
    *"(^|\s)\^\s?\^($|\s)" "อิอิ"
    "ฏก" "ฏ ก"
    "ดน้" "ด น้"
    "ดมา" "ด มา"
    "ดิบดี" "ดิบ ดี"
    "โดรน" "Drone"
    "ตป" "ต ป"
    "นทา" "น ทา" 256
    "บนอ" "บ นอ"
    "ปกติ" "ปกกะติ"
    "ผบห" "ผู้บริหาร"
    "ศก." "เศรษฐกิจ "
    "ศนา" "ศ นา"
    "สนุ่" "ส นุ่"
    "สมก" "สะมะก"
    "สิเ" "สิ เ"
    "หลอล" "หล อล"
    "อนอ" "อ นอ" 256
    "อเนจอนาถ" "อเนจ อนาถ"
    "มอก" "ม อก"
    *" EV|ev([^A-Za-z])" " อีวี$1"
    *" PE|pe([^A-Za-z])" " พีอี$1"
    *"([A-Za-z])science" "$1 science"
    *"(บ|น)อย่า" "$1 อย่า"
    *"5{3,}" "ห้าห้าห้า"
    *"คห(ส|ล)ต" "ความเห็นส่วนตัว"
    *"ถ{3,}" "ถ ถ ถ"
    *"(\D)\.(\d)" "$1. $2"
    *"(\D)\s*-\s*(\d)" "$1 ถึง $2"
    *"(\d)\s*-\s*(\D)" "$1 ถึง $2"
    *"([ก-๛>])\s+([ก-๛<])" "$1<break time=""100ms""/>$2"

    Sorawut
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2019/01/21 07:50:55
    • Status: offline
    Re: @Voice skipped to speech a whole Thai paragraph 2019/05/20 01:19:27 (permalink)
    "Sync articles with Pocket" with this link
    https://www.facebook.com/LOCALRY/posts/629126144181642
     
    และคุณรู้ไหมว่าเมืองไทยก็มีหลักสูตรวิชา “การตายอย่างมีคุณภาพ” (Beautiful Death) เปิดสอนที่จุฬาลงกรณ์มหาวิทยาลัย ตั้งแต่ปี 2559 (ก่อนหน้านั้นคือ วิชามรณะศึกษา) สอนโดย “ร.ศ.ดร.เอมอัชฌา วัฒนบุรานนท์” วิชานี้ไม่เกี่ยวกับศาสนาแต่เป็นเรื่องของการใช้ชีวิต เพื่อให้ผู้เรียนได้เรียนรู้และเอาไปประยุกต์ใช้ในชีวิตประจำวันได้จริง จุดมุ่งหมายคือให้ทุกคนได้ทำความเข้าใจกับความตายและยอมรับให้ได้เมื่อต้องเผชิญความตาย โดยพูดในมิติของชีวิต การแพทย์ กฎหมาย และสังคม และหากขยับเข้าไปใกล้กับเรื่องของ ‘ไลฟ์สไตล์’ แทบไม่น่าเชื่อว่าตอนนี้บ้านเราก็มี Death Concept Café&Restaurant คือการหยิบความตายมาตีความออกเป็น Business


    The speech worked properly if I disable these 3 below.
     
    *"\s*\(" "<break time=""100ms""/>วงเล็บ "
    *"\)\s*" "<break time=""200ms""/>"
    *"([ก-๛>])\s+([ก-๛<])" "$1<break time=""100ms""/>$2"

    Sorawut
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2019/01/21 07:50:55
    • Status: offline
    Re: @Voice skipped to speech a whole Thai paragraph 2019/05/20 01:43:25 (permalink)
    I think "<break time=""100ms""/>" causes this issue because it increased total characters of text too many for Google TTS.
    Sorawut
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2019/01/21 07:50:55
    • Status: offline
    Re: @Voice skipped to speech a whole Thai paragraph 2019/05/21 06:22:21 (permalink)
    I found a workaround. Just added below Edit speech and it worked as usual.
     
    "&amp;" " and "
     
    Admin
    Administrator
    • Total Posts : 275
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: @Voice skipped to speech a whole Thai paragraph 2019/05/26 04:41:49 (permalink)
    Interesting. I'm glad you have found the fix, for me it would be very very difficult to follow the unfamiliar language and script to debug such issues.
    Jump to:
    © 2024 APG vNext Commercial Version 5.1