Dogfennaeth API Adnabod Lleferydd
Speech Recognition API Documentation
Wedi Diweddaru: Last Updated: 11 MawMar, 2024
API Fersiwn 2 (v2) API Version 2 (v2)
Trawsgrifio
Transcribe
https://api.techiaith.cymru/speech-to-text/v2/transcribe/
Paramedr | Math | Disgrifiad | |
---|---|---|---|
Field | Type | Description | |
soundfile | String | Lleoliad y ffeil wav neu mp3 hoffwch chi drawsgrifio | Path to the wav or mp3 file you wish to transcribe |
Enghraifft:
Example:
curl-X POST -F 'soundfile=@speech.wav' https://api.techiaith.cymru/speech-to-text/v2/transcribe/
Canlyniad Enghreifftiol:
Example Result:
{
"id":"188a0e4d-4ac8-4992-af7d-7ba6f71bc02d",
"version":2,
"success":true,
"transcripts":[
{
"start":0.609,
"end":4.628,
"text":"Mae ganddynt ddau o blant, mab a merch.",
"words":[
{"word":"Mae","start":0.609,"end":0.79,"score":0.361},
{"word":"ganddynt","start":0.83,"end":1.493,"score":0.258},
{"word":"ddau","start":1.634,"end":2.096,"score":0.203},
{"word":"o","start":2.156,"end":2.217,"score":0.333},
{"word":"blant,","start":2.257,"end":2.86,"score":0.208},
{"word":"mab","start":3.201,"end":3.643,"score":0.161},
{"word":"a","start":4.105,"end":4.226,"score":0.167},
{"word":"merch.","start":4.286,"end":4.628,"score":0.37}
],
"chars":[
{"char":"M","start":0.609,"end":0.689,"score":0.25},
{"char":"a","start":0.689,"end":0.73,"score":0.5},
{"char":"e","start":0.73,"end":0.79,"score":0.333},
{"char":" ","start":0.79,"end":0.83,"score":0.5},
{"char":"g","start":0.83,"end":0.91,"score":0.25},
...
{"char":"c","start":4.568,"end":4.608,"score":0.5},
{"char":"h","start":4.608,"end":4.628,"score":0.649},
{"char":"."}
]
}
]
}
API Fersiwn 1 (v1) API Version 1 (v1)
Trawsgrifio
Transcribe
https://api.techiaith.cymru/speech-to-text/v1/transcribe/
Paramedr | Math | Disgrifiad | |
---|---|---|---|
Field | Type | Description | |
soundfile | String | Lleoliad y ffeil wav neu mp3 hoffwch chi drawsgrifio | Path to the wav or mp3 file you wish to transcribe |
Enghraifft:
Example:
curl-X POST -F 'soundfile=@speech.wav' https://api.techiaith.cymru/speech-to-text/v1/transcribe/
Canlyniad Enghreifftiol:
Example Result:
{
"version": 1,
"success": true,
"transcripts": [
{
"text": "mae ganddynt ddau o blant mab a merch ",
"confidence": 0.999,
"start": 0.0,
"end": 5.50275,
"alignment": [
["m", 30],
["a", 34],
["e", 37],
[" ", 40],
...
["c", 228],
["h", 231],
[" ", 273]
]
}
]
}