Loading files
a6408cd8eThis file is pinned to the selected release. Download the original to open it in your design tool.
Files from this revision, including CAD and LFS contents. Git history is not included.
Or in GitHub Desktop, choose File → Clone repository → URL and paste this address.
Public repositories can be cloned without signing in. For pushing, use your ThingAtlas username and a Git access token as the password.
git lfs install git clone https://thingatlas.com/git/-unclaimed/stack-chan-374381865.git
Includes Git history, branches, and Git LFS files. Clones the repository’s default branch, regardless of the version shown here.
import config from 'mc/config'
import STT from 'stt-whisper'
import Resource from 'Resource'
const token = config.token
const audio = new Resource('speak.wav')
if (!token || token === 'YOUR_API_KEY_HERE') throw new Error('API token is missing.')
const stt = new STT({
apiKey: token,
})
try {
const result = await stt.transcribe(audio)
if (result.success === true) {
trace(result.value)
} else {
trace(`Error: ${result.reason}`)
}
} catch (error) {
trace(`An error occurred: ${error.message}`)
}
a6408cd8eThis file is pinned to the selected release. Download the original to open it in your design tool.