reset
Syntax
Description
reset(
resets the internal state of
the streaming-enabled clientObj
)speechClient
object.
Examples
Reset State of Streaming Speech-to-Text Client
Create an Emformer speechClient
object for streaming speech-to-text. Create a dsp.AudioFileReader
object to read in an audio file.
emformerSpeechClient = speechClient("emformer"); afr = dsp.AudioFileReader("Counting-16-44p1-mono-15secs.wav");
Perform streaming speech-to-text in a loop and print out the transcription.
txtTotal = ""; while ~isDone(afr) x = afr(); txt = speech2text(x,afr.SampleRate,Client=emformerSpeechClient); txtTotal = txtTotal + txt; end txtTotal
txtTotal = "one two three four five six seven eight nine"
Reset the state of the Emformer speechClient
object to start streaming speech-to-text on a new audio file.
reset(emformerSpeechClient) afr = dsp.AudioFileReader("Rainbow-16-8-mono-114secs.wav"); txtTotal = ""; while ~isDone(afr) x = afr(); txt = speech2text(x,afr.SampleRate,Client=emformerSpeechClient); txtTotal = txtTotal + txt; end txtTotal
txtTotal = "when the sunlight strikes rain dro drops in the air act as a prism and form a rainbow the rainbow is a division of white light into many beautiful colors these take the shape of a long arch with its path high above and two ends apparently beyond the horiz there is according to lege ailing pot of gold at one end people look but no one ever finds it when a man looks for something beyond his reach his friend say he is looking for the pot of gold at the end of the rainbow throughout the centuries people have explained the rainbow in various ways some have accepted it as a miracle without physical explanation to the hebrews it was a token that there would be no more universal floods the greeks used to imagine that was a sign from the gods to foretell war or heavy rain the norsemen considered the rainbow as a bridge over which the gods from the earth to their home in the sky others have tried to explain the phen arist thought the rainbow was caused bylection of the sun's by the sun since then physic have found that is not a reflection but refraction by raindrops which causes the rainbows many complicated ideas about the rainbow have been formed the difference in the rainbow depends considerably on thes oft the width of the coloured band increase of the drops increases the actual primary rainbow observed is said to be the effect of a superim of a number of bows if the red of the secondbow falls upon the green of the first the result the result is to give a bow with an abnorm wide yellow band since red and green light when mix from yellow this is a very common type ofa one showing manly red and yellow with little or no green or blue"
Input Arguments
clientObj
— Client object
speechClient
object
Client object to reset, specified as an object returned by speechClient
. Resetting the internal state applies only to the Emformer
speech-to-text model returned by calling speechClient
with
"emformer"
.
Version History
Introduced in R2024a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)