Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Dynamically highlight content as it is spoken
ResourceFunction["ElevenLabsHighlightSpeak"][text] creates an interface highlighting words in text as they are spoken. | |
ResourceFunction["ElevenLabsHighlightSpeak"][list] attempts to intelligently speak the elements of list while highlighting parts. | |
ResourceFunction["ElevenLabsHighlightSpeak"][…,prop] returns the specified property. |
| "List" | list with a AudioStream and dynamicly highlighted content |
| "Interface" | content along with a button for playing the speech |
| "HighlightStyle" | Background→Green | Style specification for the highlighted content |
| "HighlightSize" | "Word" | granularity to highlight within text |
| "SpokenStringMethod" | Automatic | how to convert expressions into strings |
| LLMEvaluator | $LLMEvaluator | service for generating spoken strings with "SpokenStringMethod"→"LLM" |
| "CacheAudio" | True | whether to cache audio generation |
| SpokenString | local text creation with SpokenString |
| {"SplitList",f} | applies f only to non-string components |
| "LLM" | uses LLMFunction to create spoken strings |
| f | arbtrary function |
Create an interface for playing spoken text while it is highlighted:
| In[1]:= |
| Out[1]= | ![]() |
Non-string expressions are highlighted in whole:
| In[2]:= | ![]() |
| Out[2]= | ![]() |
Include a mix of text and mathematical expressions:
| In[3]:= | ![]() |
| Out[3]= | ![]() |
Create an output containing text:
| In[4]:= |
| Out[4]= |
| In[5]:= |
| Out[5]= |
Use the CellObject as an input:
| In[6]:= |
| Out[6]= | ![]() |
Use the Cell expression:
| In[7]:= |
| Out[7]= |
| In[8]:= |
| Out[8]= | ![]() |
Get the audio stream and highlight content without a pre-built interface:
| In[9]:= | ![]() |
| Out[9]= | ![]() |
Play the stream to see the highlighting:
| In[10]:= |
| Out[10]= | ![]() |
Speak a combination of text and code:
| In[11]:= | ![]() |
| Out[11]= |
Choose a voice from the ElevenLabs service connection:
| In[12]:= |
| Out[12]= |
Speak a combination of text and code using the selected voice::
| In[13]:= | ![]() |
| Out[13]= | ![]() |
Control the highlight styling:
| In[14]:= |
| Out[14]= | ![]() |
Highlight each character instead of each word in the text:
| In[15]:= |
| Out[15]= | ![]() |
Also set the styling to something weird:
| In[16]:= | ![]() |
| Out[16]= | ![]() |
By default, audio responses are cached in memory for fast result on repeated requests:
| In[17]:= | ![]() |
| Out[17]= | ![]() |
| In[18]:= | ![]() |
| Out[18]= | ![]() |
Turn off the caching:
| In[19]:= | ![]() |
| Out[19]= | ![]() |
Cell content that is hard to read as natural language gives strange results:
| In[20]:= |
| Out[20]= | ![]() |
| In[21]:= |
| Out[21]= | ![]() |
Large content is summarized automatically to save time and cost:
| In[22]:= |
| Out[22]= |
| In[23]:= |
| Out[23]= |
The spoken text is usually not helpful:
| In[24]:= |
| Out[24]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License