flogy/gatsby-mdx-tts

Create nodes to make speech output data queryable

flogy opened this issue · 1 comments

flogy commented

It would be great to be able to query the generated speech output data, meaning:

  • relative path to the generated MP3 audio file
  • speech marks

In addition to better aligning with the way Gatsby is built, we would also no longer need to have two files in the public folder, one being the mp3 file and one being the JSON file containing the speech marks.

I have created the create-nodes branch to play around with this.

Unfortunately, I ran into some obstacles, as creating nodes seems to be not so easy from inside a sub-plugin. I opened up those two issues containing the detailed information:

This issue is therefore on hold until those issues are cleared and we have a stable way to create nodes.

flogy commented

Maybe we can implement it as a transformer plugin that transforms Mdx nodes to Polly nodes as used in https://github.com/flogy/gatsby-transformer-polly? Like that we must not parse the props of the <SpeechOutput> comonents in MDX but only get the id and query the rest using static queries where you could add query params for voiceId etc.