View in code hereDescription: When a user speaks to chat, this API is called.
API CALL :curl 'https://dev-auth.ulcacontrib.org/ulca/apis/asr/v1/model/compute' \ -H 'authority: dev-auth.ulcacontrib.org' \ -H 'accept: */*' \ -H 'accept-language: en-US,en;q=0.9' \ -H 'content-type: application/json' \ -H 'origin: http://localhost:3000' \ -H 'referer: http://localhost:3000/' \ -H 'sec-fetch-dest: empty' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-site: cross-site' \ -H 'sec-gpc: 1' \ -H 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1' \ --data-raw '{"modelId":"","task":"asr","audioContent":"","source":"en","userId":null}' \ --compressed
MODEL IDS
i) Hindi (AI4Bharat IndicWav2Vec ASR Batch - Hindi v2.0) - 620fb9fc7c69fa1fc5bba7be
ii) Bengali (AI4Bharat Bengali Indo-Aryan ASR (Conformer, Batch) v4.0) - 6411746956e9de23f65b5426
iii) Tamil (AI4Bharat Tamil Dravidian ASR (Conformer, Batch) v4.0) - 641174ad56e9de23f65b542a
iv) Telugu (AI4Bharat Telugu Dravidian ASR (Conformer, Batch) v4.0) - 6411748db1463435d2fbaec5
v) English (AI4Bharat English ASR (Conformer, Batch) v4.0) - 63ee09c3b95268521c70cd7c
AI4Bharat (Translation):
View in code hereDescription: When a user speaks numbers in a language other than English, this API is used to convert the numbers from the user's language to English and then to numeric values. For eg: if a user speaks एक दो तीन then this API will convert it to "one two three" and then code is written to convert it to "1 2 3".
API CALL :curl 'https://dev-auth.ulcacontrib.org/ulca/apis/v0/model/compute' \ -H 'authority: dev-auth.ulcacontrib.org' \ -H 'accept: */*' \ -H 'accept-language: en-US,en;q=0.9' \ -H 'content-type: application/json' \ -H 'origin: http://localhost:3000' \ -H 'referer: http://localhost:3000/' \ -H 'sec-fetch-dest: empty' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-site: cross-site' \ -H 'sec-gpc: 1' \ -H 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1' \ --data-raw '{"modelId":"6110f8b7014fa35d5e767c48","task":"translation","input":[{"source":"एक दो तीन"}],"userId":null}' \ --compressed
MODEL IDS
i) Hindi to English (AI4Bharat IndicTrans Translation Hindi-English v0.3) - 6110f8b7014fa35d5e767c48
ii) Bengali to English (AI4Bharat IndicTrans Translation Bengali-English v0.3) - 6110f7bc014fa35d5e767c3b
iii) Tamil to English (AI4Bharat IndicTrans Translation Tamil-English v0.3) - 6110f917014fa35d5e767c4e
iv) Telugu to English (AI4Bharat IndicTrans Translation Telugu-English v0.3) - 6110f924014fa35d5e767c4f
Vakyansh (Text to Speech):
View in code here and hereDescription: When a user wants to hear a text in the app, this API is used to deliver the audio output of that text.
API CALL :curl 'https://dev-auth.ulcacontrib.org/ulca/apis/v0/model/compute' \ -H 'authority: dev-auth.ulcacontrib.org' \ -H 'accept: */*' \ -H 'accept-language: en-US,en;q=0.9' \ -H 'content-type: application/json' \ -H 'origin: http://localhost:3000' \ -H 'referer: http://localhost:3000/' \ -H 'sec-fetch-dest: empty' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-site: cross-site' \ -H 'sec-gpc: 1' \ -H 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1' \ --data-raw '{"modelId":"","task":"tts","input":[{"source":"Where is my money?"}],"gender":"female","userId":null}' \ --compressed
MODEL IDS
i) Hindi (Vakyansh TTS - Hindi v1.0) - 61ea3ab41121fa5fec13aeaf
ii) Bengali (Vakyansh TTS - Bengali v1.0) - 621774da7c69fa1fc5bba7d6
iii) Tamil (Vakyansh TTS - Tamil v1.0) - 61ea3b171121fa5fec13aeb1
iv) Telugu (Vakyansh TTS - Telugu v1.0) - 620cd101bedccf5280e4eb26
v) English (Vakyansh TTS - English v1.0) - 623ac7b27c69fa1fc5bba7df
TRANSPORT SOCKET
Description:NEXT_PUBLIC_SOCKET_URL is the transport socket URL where the connection is established to send and receive messages.
View in code here and here.
AI4Bharat (Speech To Text):
View in code here Description: When a user speaks to chat, this API is called.
API CALL :
curl 'https://dev-auth.ulcacontrib.org/ulca/apis/asr/v1/model/compute' \ -H 'authority: dev-auth.ulcacontrib.org' \ -H 'accept: */*' \ -H 'accept-language: en-US,en;q=0.9' \ -H 'content-type: application/json' \ -H 'origin: http://localhost:3000' \ -H 'referer: http://localhost:3000/' \ -H 'sec-fetch-dest: empty' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-site: cross-site' \ -H 'sec-gpc: 1' \ -H 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1' \ --data-raw '{"modelId":"","task":"asr","audioContent":"","source":"en","userId":null}' \ --compressed
MODEL IDS i) Hindi (AI4Bharat IndicWav2Vec ASR Batch - Hindi v2.0) - 620fb9fc7c69fa1fc5bba7be ii) Bengali (AI4Bharat Bengali Indo-Aryan ASR (Conformer, Batch) v4.0) - 6411746956e9de23f65b5426 iii) Tamil (AI4Bharat Tamil Dravidian ASR (Conformer, Batch) v4.0) - 641174ad56e9de23f65b542a iv) Telugu (AI4Bharat Telugu Dravidian ASR (Conformer, Batch) v4.0) - 6411748db1463435d2fbaec5 v) English (AI4Bharat English ASR (Conformer, Batch) v4.0) - 63ee09c3b95268521c70cd7c
AI4Bharat (Translation):
View in code here Description: When a user speaks numbers in a language other than English, this API is used to convert the numbers from the user's language to English and then to numeric values. For eg: if a user speaks एक दो तीन then this API will convert it to "one two three" and then code is written to convert it to "1 2 3".
API CALL :
curl 'https://dev-auth.ulcacontrib.org/ulca/apis/v0/model/compute' \ -H 'authority: dev-auth.ulcacontrib.org' \ -H 'accept: */*' \ -H 'accept-language: en-US,en;q=0.9' \ -H 'content-type: application/json' \ -H 'origin: http://localhost:3000' \ -H 'referer: http://localhost:3000/' \ -H 'sec-fetch-dest: empty' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-site: cross-site' \ -H 'sec-gpc: 1' \ -H 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1' \ --data-raw '{"modelId":"6110f8b7014fa35d5e767c48","task":"translation","input":[{"source":"एक दो तीन"}],"userId":null}' \ --compressed
MODEL IDS i) Hindi to English (AI4Bharat IndicTrans Translation Hindi-English v0.3) - 6110f8b7014fa35d5e767c48 ii) Bengali to English (AI4Bharat IndicTrans Translation Bengali-English v0.3) - 6110f7bc014fa35d5e767c3b iii) Tamil to English (AI4Bharat IndicTrans Translation Tamil-English v0.3) - 6110f917014fa35d5e767c4e iv) Telugu to English (AI4Bharat IndicTrans Translation Telugu-English v0.3) - 6110f924014fa35d5e767c4f
Vakyansh (Text to Speech):
View in code here and here Description: When a user wants to hear a text in the app, this API is used to deliver the audio output of that text.
API CALL :
curl 'https://dev-auth.ulcacontrib.org/ulca/apis/v0/model/compute' \ -H 'authority: dev-auth.ulcacontrib.org' \ -H 'accept: */*' \ -H 'accept-language: en-US,en;q=0.9' \ -H 'content-type: application/json' \ -H 'origin: http://localhost:3000' \ -H 'referer: http://localhost:3000/' \ -H 'sec-fetch-dest: empty' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-site: cross-site' \ -H 'sec-gpc: 1' \ -H 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1' \ --data-raw '{"modelId":"","task":"tts","input":[{"source":"Where is my money?"}],"gender":"female","userId":null}' \ --compressed
MODEL IDS i) Hindi (Vakyansh TTS - Hindi v1.0) - 61ea3ab41121fa5fec13aeaf ii) Bengali (Vakyansh TTS - Bengali v1.0) - 621774da7c69fa1fc5bba7d6 iii) Tamil (Vakyansh TTS - Tamil v1.0) - 61ea3b171121fa5fec13aeb1 iv) Telugu (Vakyansh TTS - Telugu v1.0) - 620cd101bedccf5280e4eb26 v) English (Vakyansh TTS - English v1.0) - 623ac7b27c69fa1fc5bba7df
TRANSPORT SOCKET
Description:
NEXT_PUBLIC_SOCKET_URL
is the transport socket URL where the connection is established to send and receive messages. View in code here and here.