Text to speech and accompanying metadata - speech-synthesis

I want to convert text to speech and be supplied with the accompanying meta data as to what interval each word occurs at and its period. So "The dog ate" might be
The: start 0, end .3s
Dog: start .5s, end .8s
Ate: start .11s, end .14s
Is there way of convert text to speech and has obtaining such data other than going through the resulting audio file looking for pauses.
Cheers

iSpeech offer a txt to speech solution whose api is able to provide position markers for words which is excellent. The info can be found in section four of the api which can be found here http://www.ispeech.org/api . Would like to hear of other sollutions though.
Cheers

Related

Dynamically change line color dcc.Graph Plotly Dash between annotations

I'm writing a 'template creation' app using the dcc.Graph image annotation features in Plotly Dash.
The user adds multiple rectangles for specific features in the image (an invoice) and my callback captures the coordinates of each rectangle via the relayoutData variable. I want to use a different color for each rectangle, but can't figure out how to do it.
It seems like the only way to change the newshapes fillcolor
property is to replace the whole figure, but then I lose all previous shapes
All and any help appreciated.
Andrew
I have just found the following demo that does exactly what I am trying to do:
https://dash-gallery.plotly.host/dash-image-annotation/
Now to unpack the logic and adapt it to my context ... Happy 2021!
Andrew

HTML inside JSON

I'm using an API to get some data, but one of the JSON values, contains HTML inside of it. Is there a way for me to use the HTML tags that are inside the JSON value exactly like they are shown, instead of having to make the exact same HTML tags in my MVC view, and editing these ones out? If this wasnt descriptive enough heres an example of what i mean:
This is just one of the JSON values, I didnt wanna paste the whole thing:
"detail": "<h1>Overwatch Patch Notes – October 19, 2016</h1>\r\n\r\n<p>A new patch is now live on Windows PC. Read below to learn more about the latest changes.</p>\r\n\r\n<p>To share your feedback, please post in the General Discussion forum.<br />\r\nFor a list of known issues, visit our Bug Report forum.<br />\r\nFor troubleshooting assistance, visit our Technical Support forum.</p>\r\n\r\n<p>Please note that these changes will be rolled into a larger patch for PlayStation 4 and Xbox One at a later date.</p>\r\n\r\n<h2>BUG FIXES</h2>\r\n\r\n<p><strong>General</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed an issue causing the default Overwatch spray to override a player’s chosen spray when watching a Play of the Game or Highlight</li>\r\n\t<li>Fixed an issue causing players to frequently disconnect while viewing Highlights</li>\r\n\t<li>Fixed a bug preventing the appropriate music from playing after a loss on the Junkenstein's Revenge Brawl</li>\r\n</ul>\r\n\r\n<p><strong>Gameplay</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed a bug causing multiple issues when displaying data on the leaderboards</li>\r\n</ul>\r\n\r\n<p><strong>Heroes</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed an issue preventing Ana’s Nano Boost callouts from being heard by the enemy team</li>\r\n\t<li>Fixed a bug preventing players from receiving credit toward the Healing Done commendation when healing D.Va’s mech</li>\r\n\t<li>Fixed a graphical issue that was preventing the liquid in Mei’s Endothermic Blaster from appearing</li>\r\n\t<li>Fixed a bug causing Reinhardt’s Charge to unexpectedly stop when crossing certain thresholds (e.g. when exiting a dropship)</li>\r\n\t<li>Increased the volume of Roadhog’s “Want some candy” voice line</li>\r\n</ul>\r\n\r\n<p><strong>Map</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed a bug on Eichenwalde that caused some textures to stretch across the map for some players</li>\r\n</ul>\r\n".
You can use Html.Raw inside your view to use the raw string value:
#Html.Raw(Model.detail);
https://msdn.microsoft.com/en-us/library/gg480740(v=vs.118).aspx

ITK difference betweeen SetInitialTransform and SetMovingInitialTransform

I am now using ITK library to image registration. I wonder, when setting initial parameters for ImageRegistrationMethodv4 type registration, shall I use SetMovingInitialTransform and SetFixedInitialTransform like in the tutorial, or just SetInitialTransform??
The "transform" in SetInitialTransform means transform for moving image or for fixed image? Thank you:)
(Please read this with caution--I do not have the library with me to test this answer; it's based on memory only.)
I believe SetInitialTransform() refers to the transform which is actually optimized by the registration method. In other words, it is a collection of transform parameters that specify an "initial guess" for the optimization process; these parameters will then start moving around at each iteration. (They are therefore applied to the moving image.)
I think SetMovingInitialTransform() and SetFixedInitialTransform() refer to static initial transforms which do no change at all during the registration process. They merely "set up" the moving and fixed images to desired starting locations, if you are not satisfied with their default positions in space.
If you have some simple 2D images, try testing this answer out with simple initial transformations, like a 5-unit translation transformation or something.
You could try reading the ImageRegistrationMethov4 documentation for a little more info.

Solidworks hollow/shell a STL Part

I'm pretty new at solidworks!!
But I've been able to create a solid from a stl files. It's a Truncated tetrahedron shape.
Now I wanted this shape to be hollow (for 3D printing and adding threads).
So I've searched for a while and found a tutorial for the shell tool. This didn't work out because it gave me an error. That the faces may offset in adjacent spaces.
So I thought if I had one part and then a the same part but scale it 3mm. Place them on the same spot and then subtract them of some sort. It would give me the same shelled shape I want.
Would this work and does anybody know a way to do this or has a better way to hollow out my solid.
STL & PART upload.
Files Google Drive
If you have SOLIDWORKS Professional or Premium, you can use ScanTo3D to turn the part into a Solid / Surface body. At that point, you can manipulate the geometry as you would anything else in SOLIDWORKS.
Here's a video showing both turning on ScanTo3D and how to use it.
https://youtu.be/ZjzqWCfNfmQ
"So I thought if I had one part and then a the same part but scale it
3mm. Place them on the same spot and then subtract them of some sort.
It would give me the same shelled shape I want."
use the move/copy body command to copy it
use the scale command to scale it
use the combine feature to subject the smaller body from the main body
Alternatively use the check geometry feature to find any faulty faces and ALWAYS run import diagnostics on an imported body. if you can find and fix a faulty face try the shell tool again. If the minimum radius is too small then you will need to manually offset faces using the offset surface command

Remove text within certain identifiers from html string in AS3

For a project, I'm trying import htmlText into flash, and then remove any items flash will not process. For example, the html I want to import contains custom "[caption][/caption]" code. I essentially want to remove these identifiers and any text from in between them so that flash will not display them in a text field. Does anyone have a good suggestion/example for me? I have been trying to figure out how to use regular expressions to do this, but have been unsuccessful in finding a good guide for it and so have failed.
And example of text I'm trying to filter:
<em>Pushmo</em> is a game filled with questions. How do I solve this puzzle? Is that a 8-bit Mario's face? Why is this old, obese blob making tons of death traps that easily ensnare and encase unsuspecting children?
[caption id="attachment_37414" align="alignleft" width="400" caption="The fat, red sumo goes into the most dangous place imaginable."]<img class="size-medium wp-image-37414" title="Pushmo-title" src="/2011/12/pushmo-3ds-title-screen-400x203.jpg" alt="Pushmo Title Screen" width="400" height="203" />[/caption]
<em>Pushmo</em> is a downloadable puzzle game in the 3DS eShop. In <em>Pushmo</em> you take on the role of Mallo, an amorphic red sumo wrestler with the mind of an Einstienian savant.
I'm looking to be able to detect identifying text and remove anything between them. I'd appreciate any suggestions anyone can give me.
You might be able to use indexOf and lastIndexOf to achieve this without regex.
Also you should have a look at String.replace
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/String.html
and an as3 regex tutorial:
http://snipplr.com/view/6608/as3-regular-expression-basics/
finally a tutorial for pure regex:
http://www.regular-expressions.info/tutorial.html