Skip to content

Commit 6e7130d

Browse files
Feat/updates (#233)
Feat/updates
2 parents 7406e8e + da4d125 commit 6e7130d

8 files changed

+58
-4
lines changed
1.89 MB
Binary file not shown.
1.44 MB
Binary file not shown.
970 KB
Binary file not shown.
735 KB
Binary file not shown.

src/data/beta-models.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
"it-IT_BroadbandModel",
3+
"it-IT_NarrowbandModel",
4+
"nl-NL_NarrowbandModel",
5+
"nl-NL_BroadbandModel"
6+
]

src/data/models.json

+24-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
{
33
"//note 1": "This file is just a temporary cache. Any changes you make here will be lost as soon as model-dropdown.jsx loads an update list from Watson.",
44
"//note 2": "model-dropdown.jsx only loads the *public* models. Any customizations you create will not be included in that list.",
5-
65
"name": "fr-FR_BroadbandModel",
76
"language": "fr-FR",
87
"url": "https://stream.watsonplatform.net/speech-to-text/api/v1/models/fr-FR_BroadbandModel",
@@ -219,9 +218,31 @@
219218
"supported_features": {
220219
"custom_language_model": true,
221220
"speaker_labels": true
222-
},
221+
},
223222
"description": "US English Short Form narrowband model."
224223
},
224+
{
225+
"name": "it-IT_BroadbandModel",
226+
"language": "it-IT",
227+
"url": "https://stream.watsonplatform.net/speech-to-text/api/v1/models/it-IT_BroadbandModel",
228+
"rate": 16000,
229+
"supported_features": {
230+
"custom_language_model": false,
231+
"speaker_labels": false
232+
},
233+
"description": "Italian broadband model."
234+
},
235+
{
236+
"name": "it-IT_NarrowbandModel",
237+
"language": "it-IT",
238+
"url": "https://stream.watsonplatform.net/speech-to-text/api/v1/models/it-IT_NarrowbandModel",
239+
"rate": 8000,
240+
"supported_features": {
241+
"custom_language_model": false,
242+
"speaker_labels": false
243+
},
244+
"description": "Italian narrowband model."
245+
},
225246
{
226247
"name": "nl-NL_BroadbandModel",
227248
"language": "nl-NL",
@@ -244,4 +265,4 @@
244265
},
245266
"description": "Dutch narrowband model."
246267
}
247-
]
268+
]

src/data/samples.json

+24
Original file line numberDiff line numberDiff line change
@@ -472,5 +472,29 @@
472472
"keywords": "optimaliseren, klantervaring, de organisaties",
473473
"speaker_labels": true
474474
}
475+
],
476+
"it-IT_BroadbandModel": [
477+
{
478+
"filename": "it-IT_BroadbandModel_sample1.wav",
479+
"keywords": "assistente, intelligenza, tecnologia",
480+
"speaker_labels": false
481+
},
482+
{
483+
"filename": "it-IT_BroadbandModel_sample2.wav",
484+
"keywords": "fatura, bolette, pagamento",
485+
"speaker_labels": false
486+
}
487+
],
488+
"it-IT_NarrowbandModel": [
489+
{
490+
"filename": "it-IT_NarrowbandModel_sample1.wav",
491+
"keywords": "assistente, intelligenza, tecnologia",
492+
"speaker_labels": false
493+
},
494+
{
495+
"filename": "it-IT_NarrowbandModel_sample2.wav",
496+
"keywords": "fatura, bolette, pagamento",
497+
"speaker_labels": false
498+
}
475499
]
476500
}

views/model-dropdown.jsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import SpeechToText from 'watson-speech/speech-to-text';
66
// load time. Once we have a token, this component will automatically fetch the current list
77
// of models and update the UI if necessary.
88
import cachedModels from '../src/data/models.json';
9+
import betaModels from '../src/data/beta-models.json';
910

1011

1112
export class ModelDropdown extends Component {
@@ -49,7 +50,9 @@ export class ModelDropdown extends Component {
4950
.map(m => (
5051
<option value={m.name} key={m.name}>{m.description.replace(/\.$/, '')}
5152
{' '}
52-
({m.rate / 1000}KHz)
53+
{betaModels.some(b => b === m.name) ? '(Beta)' : ''}
54+
{' '}
55+
({m.rate / 1000}KHz)
5356
</option>));
5457

5558
return (

0 commit comments

Comments
 (0)