├── C# └── C#QuickStart.cs ├── Java └── JavaQuickStart.java ├── Python └── PythonQuickStart.py └── README.md /C#/C#QuickStart.cs: -------------------------------------------------------------------------------- 1 | var client = new HttpClient(); 2 | var request = new HttpRequestMessage 3 | { 4 | Method = HttpMethod.Post, 5 | RequestUri = new Uri("https://speaker-verification1.p.rapidapi.com/Verification"), 6 | Headers = 7 | { 8 | { "x-rapidapi-key", "API KEY" }, 9 | { "x-rapidapi-host", "speaker-verification1.p.rapidapi.com" }, 10 | }, 11 | Content = new MultipartFormDataContent 12 | { 13 | new StringContent("") 14 | { 15 | Headers = 16 | { 17 | ContentType = new MediaTypeHeaderValue("application/octet-stream"), 18 | ContentDisposition = new ContentDispositionHeaderValue("form-data") 19 | { 20 | Name = "sound1", 21 | } 22 | } 23 | }, 24 | new StringContent("") 25 | { 26 | Headers = 27 | { 28 | ContentType = new MediaTypeHeaderValue("application/octet-stream"), 29 | ContentDisposition = new ContentDispositionHeaderValue("form-data") 30 | { 31 | Name = "sound2", 32 | } 33 | } 34 | }, 35 | }, 36 | }; 37 | using (var response = await client.SendAsync(request)) 38 | { 39 | response.EnsureSuccessStatusCode(); 40 | var body = await response.Content.ReadAsStringAsync(); 41 | Console.WriteLine(body); 42 | } 43 | -------------------------------------------------------------------------------- /Java/JavaQuickStart.java: -------------------------------------------------------------------------------- 1 | HttpRequest request = HttpRequest.newBuilder() 2 | .uri(URI.create("https://speaker-verification1.p.rapidapi.com/Verification")) 3 | .header("content-type", "multipart/form-data; boundary=---011000010111000001101001") 4 | .header("x-rapidapi-key", "API KEY") 5 | .header("x-rapidapi-host", "speaker-verification1.p.rapidapi.com") 6 | .method("POST", HttpRequest.BodyPublishers.ofString("-----011000010111000001101001\r 7 | Content-Disposition: form-data; name=\"sound1\"\r 8 | \r 9 | \r 10 | -----011000010111000001101001\r 11 | Content-Disposition: form-data; name=\"sound2\"\r 12 | \r 13 | \r 14 | -----011000010111000001101001--\r 15 | \r 16 | ")) 17 | .build(); 18 | HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()); 19 | System.out.println(response.body()); 20 | -------------------------------------------------------------------------------- /Python/PythonQuickStart.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | url = "https://speaker-verification1.p.rapidapi.com/Verification" 4 | 5 | payload = "-----011000010111000001101001\r 6 | Content-Disposition: form-data; name=\"sound1\"\r 7 | \r 8 | \r 9 | -----011000010111000001101001\r 10 | Content-Disposition: form-data; name=\"sound2\"\r 11 | \r 12 | \r 13 | -----011000010111000001101001--\r 14 | \r 15 | " 16 | headers = { 17 | 'content-type': "multipart/form-data; boundary=---011000010111000001101001", 18 | 'x-rapidapi-key': "API KEY", 19 | 'x-rapidapi-host': "speaker-verification1.p.rapidapi.com" 20 | } 21 | 22 | response = requests.request("POST", url, data=payload, headers=headers) 23 | 24 | print(response.text) 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Speaker Verification 2 | PresentID Speaker verification API checks whether two voices belong to the same person or not. This capability is potentially useful in call centers. 3 | 4 | We have proposed a deep learning-based method for speaker verification. Our team worked on this project for more than 1 year and the accuracy has passed over benchmarks such as the accuracy of the paper by Andrew Zisserman Group at Oxford University. In contrast with other methods that are text-dependent, our model is text and language-independent. On the other hand, the processing speed of our model is less than 1 sec and the model verifies a person by just two voices with a length of 4 secs. We have trained the model on tracks with English, French, Spanish, German, Persian, and Arabic languages. Our model is robust to the environment and virtual noises. 5 | 6 | 7 | 8 | **Youtube Videos** 9 | - https://www.youtube.com/embed/GSj88iiHxoA 10 | - https://www.youtube.com/embed/jgZX2YP5YIE 11 | 12 | **Input:** 13 | - Voice file 14 | - Voice URL link 15 | - Base64 Voice 16 | 17 | **Output:** 18 | - Result index 19 | - Result message 20 | 21 | **Features:** 22 | - Accuracy over 90%. 23 | - Less than 1 second processing time. 24 | - No need for GPU. 25 | - Language & text-independent. 26 | - Easy integration with your app. 27 | - Support IOS, Android, Windows and Mac devices. 28 | - Easy integration with your app. 29 | 30 | **Use Cases:** 31 | - Call center 32 | 33 | **Rules & Restrictions:** 34 | - Send data via Base64 or a voice URL or voice file. 35 | - The voice must be between three seconds and one minute. 36 | - The voices must not exceed 5 MB. 37 | - Supported file types: WAV, MP3, M4A, FLAC, AAC, OGG. 38 | 39 | ## Free try in RapidAPI 40 | https://rapidapi.com/PresentID/api/speaker-verification1 41 | --------------------------------------------------------------------------------