Bulbul-V2 by Sarvam: Revolutionizing Indian Voice AI

India is a various nation with a wealthy tapestry of languages, making seamless communication throughout areas a persistent problem. Nevertheless, Sarvam’s Bulbul-V2 helps to bridge this hole with its superior text-to-speech (TTS) know-how. By delivering pure, regionally genuine voices, the mannequin brings native taste to digital platforms and makes AI extra inclusive and accessible for desi folks such as you and me. As digital content material continues to broaden, instruments like Bulbul-V2 have gotten more and more important for builders and content material creators. On this article, I’ll cowl Sarvam AI’s discover Bulbul-V2 for TTS.

What’s Saravm?

Sarvam is an Indian AI startup based mostly in Bengaluru, based by a staff of machine studying engineers. Lately acknowledged by the Indian authorities for its work on Indian giant language fashions (LLMs), Sarvam focuses on creating speech-based AI fashions tailor-made to Indian languages. Its aim is to create natural-sounding artificial voices that seize the nuances of human speech. In contrast to standard TTS methods that always sound robotic and impassive, Sarvam’s fashions emphasize expressive supply, together with pure pauses and emotional context.

Exploring Sarvam’s Fashions

Sarvam supplies high-performance speech companies with a give attention to pure and expressive synthesized voices, optimized for conversational AI. Their flagship mannequin, Bulbul-V2, is a state-of-the-art text-to-speech (TTS) system constructed particularly for Indic languages. It adapts to varied regional languages and talking types, understands contextual cues from surrounding textual content, and delivers speech with applicable emotional tone and pure prosody. Sarvam affords 4 AI fashions designed to serve numerous Indian language wants:

  • Mayura: A multilingual translation mannequin that helps English and 11 Indian languages with automated language detection, preserving that means and context.
  • Saras: A speech-to-text mannequin that transcribes audio and interprets between Indian languages in a single pipeline.
  • Saarika: A high-accuracy text-to-speech mannequin for a number of Indian languages, providing clear and intelligible output.
  • Bulbul: The TTS spine of Sarvam, Bulbul affords human-like prosody, a number of voice personalities, and real-time synthesis tailor-made for Indian accents and languages.

What’s Particular About Bulbul-V2?

Bulbul-V2 is Sarvam’s most superior TTS mannequin thus far, constructing on the success of its predecessor with a number of progressive enhancements. It helps 11 Indian languages, delivering native-sounding voices with genuine regional accents. Bulbul-V2 is designed for each pace and value effectivity. It’s well-suited for a variety of use instances. These vary from large-scale functions to smaller deployments. The mannequin affords a number of voice personalities, corresponding to Meera and Arvind. It helps customized voice creation that permits companies to construct distinctive audio branding.

Key Options of Bulbul-V2

  • Voice Management: High quality-grained management over pitch (-1 to 1), tempo (0.3 to three), and loudness (0.1 to three)
  • Pattern Charge Choices: A number of pattern charges: 8kHz, 16kHz, 22.05kHz, 24kHz.
  • Textual content Preprocessing: Good normalization of numbers, dates, and mixed-language textual content
  • Language Assist: Assist for 11 Indian languages with BCP-47 codes.

How one can Entry Bulbul-V2?

Possibility 1: Accessing the API

To start it go to the Sarvam web site and click on on Signal with Google.

Accessing the API

Now, after getting signed, it’s going to redirect you to the Dashboard, the place you’re going to get free credit price INR 1000.

Bulbul Dashboard

Verify the ‘Subscription Key’ part to repeat your Sarvam’s API Key.

Making the First API Name

1. Putting in required libraries

!pip set up sarvamai
from sarvamai import SarvamAI
from sarvamai.play import play
import base64
  • SarvamAI: Primary SDK class used to work together with the Sarvam API.
  • paay: A helper perform that performs audio in your system.
  • base64: Python’s built-in module to decode audio from base64 (API returns audio this manner).

2. Initializing the API Consumer

consumer = SarvamAI(
   api_subscription_key="your_api_key"
)
  • Creates a SarvamAI consumer object.

3. Convert Textual content-to-speech

response = consumer.text_to_speech.convert(
   inputs=["Welcome to Sarvam AI!"],
   mannequin="bulbul:v2",
   target_language_code="en-IN",
   speaker="anushka",
   pitch=0.5,        # Vary: -1 to 1
   tempo=1.0,         # Vary: 0.3 to three
   loudness=1.2,      # Vary: 0.1 to three
   speech_sample_rate=8000,  # Choices: 8000, 16000, 22050, 24000
   enable_preprocessing=True  # Handles numbers, dates, and blended textual content


)
play(response)
  • mannequin: Makes use of the bulbul:v2 TTS mannequin.
  • target_language_code: Specifies English (India) with accent (en-IN).
  • pitch, tempo, loudness: Controls the tone, pace, and quantity.
  • speech_sample_rate: Chooses audio pattern high quality. 8000 Hz is primary (telephony-level).
  • enable_preprocessing: When True, it auto-normalizes enter (e.g., dates/numbers)
  • speaker: Makes use of the predefined voice “anushka.” Different out there choices are:
Voices in Bulbul v2

3. Saving the Output

audio_base64 = response.audios[0]  # It is a str, base64-encoded
audio_bytes = base64.b64decode(audio_base64)  # Decode to bytes
with open("output.wav", "wb") as f:
   f.write(audio_bytes)
  • Takes the base64-encoded audio as enter and decodes it to bytes.
  • Saves it because the output.wav file.

Bulbul-V2 in Motion: Voices from Totally different Languages

On this part, we’ll check Bulbul-V2’s efficiency on three main duties. As Sarvam AI says that Bulbul-V2 delivers pure, human-like voices with regional accents throughout 11 languages. So, to check this we’ll verify it on:

  • Textual content to Speech conversion(in the identical language (i.e, Punjabi to Punjabi or Hindi to Hindi)
  • The subsequent 2 duties are to verify whether or not it helps inter-language conversion or not, (i.e, Hindi to Tamil or Malayalam to Bengali)

Process 1: Humorous TTS Check

This hands-on demo will assist to analyse how properly Bulbul-V2 captures the sound and really feel of the Indian linguistic range. On this activity, I’ll cross a humorous textual content to the TTS mannequin and analyze its response based mostly on its response.

Immediate: “कल मेरा कंप्यूटर छींक रहा था-हाँ, छींक! हाहा! मैंने पूछा, ‘तुम ठीक हो?’ तो उसने जवाब दिया, ‘मुझे लगता है मुझे वायरस हो गया है!’ हेहे! मैंने उसे टिश्यू दिया, लेकिन उसे तो बस एक सॉफ्टवेयर अपडेट और गर्म कॉफी चाहिए थी। हाहा! फिर मेरा प्रिंटर हँसने लगा, और माउस चिल्लाते हुए बोला, ‘फिर से नहीं!’ हेहेहे! सच में, लगता है मेरे गैजेट्स को मुझसे ज्यादा छुट्टी चाहिए। हाहा, ओह टेक्नोलॉजी!”

consumer = SarvamAI(
   api_subscription_key="api_key"  # Put your API key right here
)


response = consumer.text_to_speech.convert(
   inputs=[ prompt],
   mannequin="bulbul:v2",
   target_language_code="gu-IN",
   speaker="karun",             # pure and conversational
   pitch=0.3,
   tempo=1.0,
   loudness=1.0,
   speech_sample_rate=16000,
   enable_preprocessing=True
)


play(response)
audio_base64 = response.audios[0]
audio_bytes = base64.b64decode(audio_base64)


with open("output_hindi.wav", "wb") as f:
   f.write(audio_bytes)

Output:

Evaluation

On this activity, we’ve used a humorous and humorous immediate to check Bulbul-V2. The mannequin spoke fluently and dealt with language properly, nevertheless, it didn’t seize the humorous or playful tone. The jokes and laughter sounded flat and missing the expressive half. Total the readability was good, however the emotional supply nonetheless wants some enchancment.

Process 2: Punjabi to Tamil Translation

On this activity, we’ll give a Punjabi immediate and ask the mannequin to alter it to Tamil.

Immediate: “ਉਹ ਕਹਿੰਦੇ ਹਨ ਕਿ ਕਮਰਾ ਸਾਫ ਰੱਖੋ ਤਾਂ ਤਾਂ ਉੱਥੇ ਸੱਚ ਮੁਚ ਆਰਾਮ ਮਿਲਦਾ ਹੈ, ਪਰ ਜਦੋਂ ਤੱਕ ਮੈਂ ਖੁਦ ਕੰਮ ਕਰ ਰਿਹਾ ਹਾਂ, ਕਮਰੇ ਦਾ ਹਾਲ ਵਧੀਅਾ ਨਹੀਂ ਹੋ ਸਕਦਾ। ਮੈਂ ਤਾਂ ਸੋਚਿਆ ਸੀ ਕਿ ਮੋਬਾਈਲ ‘ਤੇ ਚਾਰ ਘੰਟੇ ਕੁਝ ਕਰ ਕੇ ਕਮਰੇ ਦਾ ਹਾਲ ਸੁਧਾਰ ਲਵਾਂਗਾ, ਪਰ ਅਸਲ ਵਿੱਚ ਇੰਟਰਨੈਟ ‘ਤੇ ਕੁਝ ਮਜ਼ੇਦਾਰ ਵੀਡੀਓਸ ਨੇ ਮੇਰੀ ਮਿਸ਼ਨ ਨੂੰ ਫੇਲ ਕਰ ਦਿੱਤਾ।

from sarvamai import SarvamAI
from sarvamai.play import play
import base64


consumer = SarvamAI(
   api_subscription_key="api_key"  # Put your API key right here
)
response = consumer.text_to_speech.convert(
   inputs=[prompt],
   mannequin="bulbul:v2",
   target_language_code="ta-IN",
   speaker="manisha", 
   pitch=0.3,
   tempo=1.0,
   loudness=1.0,
   speech_sample_rate=16000,
   enable_preprocessing=True
)
play(response)
audio_base64 = response.audios[0]
audio_bytes = base64.b64decode(audio_base64)


with open("output_tamil.wav", "wb") as f:
   f.write(audio_bytes)

Output:

Evaluation

For this activity, I’ve supplied a Punjabi immediate and requested Bulbul-V2 to generate Tamil speech. Nevertheless, the output begins with Punjabi after which immediately begins Tamil, as a substitute of giving a easy Tamil response. This reveals that the mannequin has not carried out translation but. It solely reads the enter, and because of this, it lacks the power to translate correctly in Tamil.

Process 3: Malayalam to Gujarati Translation

On this activity, we’ll give a Malayalam immediate and ask the mannequin to alter it to Gujarati.

Immediate:”എന്താണ് ഇവർ ചിന്തിക്കുന്നത്? ഞാനൊരു മണിക്കൂർ കാത്തിരുന്നത്! ഇത് എല്ലാം സപ്പോർട്ട് ഇല്ലാത്തതാണ്! എന്താ സങ്കടം! അവർക്ക് അറിയാമോ എത്ര വണ്ണം ചെലവാക്കേണ്ടി വന്നിരിക്കുന്നു! ഇങ്ങനെ പോകുന്നത് എങ്ങിനെയാണ്? ഈ ലോകത്ത് ആരും എത്രയും നിശ്ചയിച്ച് തങ്ങളുടെയായി നടക്കുന്നു!

from sarvamai import SarvamAI
from sarvamai.play import play
import base64


consumer = SarvamAI(
   api_subscription_key="your_api_key"  # Put your API key right here
)


response = consumer.text_to_speech.convert(
   inputs=[prompt],
   mannequin="bulbul:v2",
   target_language_code="gu-IN",
   speaker="abhilash", 
   pitch=0.3,
   tempo=1.0,
   loudness=1.0,
   speech_sample_rate=16000,
   enable_preprocessing=True
)
play(response)
audio_base64 = response.audios[0]
audio_bytes = base64.b64decode(audio_base64)


with open("output_gujrati.wav", "wb") as f:
   f.write(audio_bytes)

Output:

Evaluation

For this activity, I’ve supplied a Malayalam immediate and requested the mannequin to generate Gujarati speech. Nevertheless, the mannequin fully fails to translate the immediate to Gujarati. As a substitute of this, it provides a easy Malayalam as a response. This reveals that the mannequin has not carried out translation but. For correct language conversion, an exterior translation step ought to must be included earlier than passing the textual content to TTS modes.

Total Efficiency

Process Enter Language Goal Language How Nicely It Labored What Occurred What to Do Subsequent
1 Humorous immediate (English) English Good Spoke clearly and easily, however lacked humor or liveliness. Enhance voice to higher categorical feelings like laughter.
2 Punjabi Tamil Not good Began in Punjabi, then immediately switched to Tamil mid-sentence. Use a correct translation service earlier than TTS.
3 Malayalam Gujarati Failed Output was nonetheless in Malayalam; no translation occurred. Translate the textual content manually earlier than utilizing TTS.

Use Circumstances

Bulbul-V2’s quick and pure text-to-speech capabilities make it slot in many real-world instances the place inter-language conversion is just not concerned. Listed here are some sensible examples the place this can be utilized:

  • Assistive Expertise: TTS transforms textual content into speech for visually impaired customers. Display readers powered by this type of know-how can present a pure and fascinating expertise to the customers. Together with this, TTS can even assist non-verbal people to speak.
  • E-Studying and Content material Creation: TTS fashions can be utilized to make audiobooks, different academic supplies, and voice-over for movies. This helps in making studying extra partaking, as people can use it of their native language, and likewise makes it extra inclusive.
  • Language Translation & Localization: TTS know-how helps the creation of localized content material. It permits real-time translation for functions. Bulbul-V2 has low latency, making it appropriate for real-time functions. These embody convention deciphering help and dwell customer support interplay. Academic platforms can even use it to assist people hear correctly.

Bulbul-V2 is making a robust impression within the area of TTS fashions, particularly for the Indian market. Its most important edge over others is that it helps 11 native Indian languages, which cowl nearly all of the Indian subcontinent.

Whereas evaluating Bulbul-V2 with world rivals like ElevenLabs. Bulbul-V2 stands out with its quick efficiency, with supply P90 latency in 0.398 seconds, which is roughly twice as quick as ElevenLabs.

Bulbul-V2 additionally affords a parameter like management over pitch, tempo, loudness, and pattern price, together with good processing for numbers and dates. It’s not solely maintaining with worldwide TTS leaders but additionally setting new benchmarks in pace, effectivity, and affordability.

Conclusion

Bulbul-V2 makes a major leap ahead in India’s journey to develop its personal LLM, particularly within the area of test-to-speech fashions by delivering quick, pure, and regional genuine voices. Its distinctive pace and affordability make it accessible to a variety of functions, various from assistive units to content material creation. Whereas it at the moment doesn’t have assist for automated translation between languages, this may be overdone by combining Bulbul-V2 with exterior instruments like google translate. With ongoing enhancements in expressiveness and expanded options for constructing extra partaking voice experiences. With this, Bulbul-V2 is ready to play a key function in the way forward for Indian AI.

Hello, I am Vipin. I am keen about knowledge science and machine studying. I’ve expertise in analyzing knowledge, constructing fashions, and fixing real-world issues. I intention to make use of knowledge to create sensible options and continue learning within the fields of Knowledge Science, Machine Studying, and NLP. 

Login to proceed studying and luxuriate in expert-curated content material.