Package: common-ml-functions
Common ML Functionalities APIPython package which provides useful and common interactions with ML functionalitiessuch as detecting language, chatbots, 
    link transcriptions, audio enhancements, and much more.Powered bySieve,LangchainFeaturesTranslation (sieve/seamless_text2text): Translates text from a source language to a target language.Youtube Link Transcription (langchain/youtube_transcripts): Transcribes audio from a given URL.Detect Language (sieve): Identifies the language of the given text.Text to Speech (sieve): Converts text into spoken words.Translate and Talk (sieve): Translates text from one language to another and then converts the translated text to speech.Youtube Video Download (sieve): Downloads a Youtube video in MP4 format given its URL.Detect Language and Translate: Detects the language of the text and translates it to a specified target language.Audio Enhancement (sieve): Enhances the quality of an mp3 or wav file.Visual question answering (sieve/llava-vl-13b): Visual question answering with GPT-4 level capabilities.SetupTo set up the package, follow these steps:Install the Package: Install this package using pip:
pip install common-ml-functionsImport in Your Project: Import the required functionalities in your Python project:fromcommon-ml-functions.translationimporttranslatefromcommon-ml-functions.text_to_speechimportconvert_text_to_speech# ... other imports as neededUsageThe package offers a range of functionalities that can be easily integrated into Python projects. Here are some of the features and how to use them:Translation: Usetranslate(original_text, source_language, target_language)to translate text.fromcommon-ml-functions.languageimporttranslatetranslated_text=translate("Hello, world!","en","es")print(translated_text)Youtube Link Transcription: Useyb_transcript(url)to get transcriptions of YouTube videos.fromcommon-ml-functions.ybimportyb_transcripttranscript=yb_transcript("https://www.youtube.com/watch?v=example")print("Transcript:",transcript)Detect Language: Usedetect(text)to identify the language of a given text.fromcommon-ml-functions.languageimportdetectlanguage_code=detect("Ceci est un texte en français.")print(f"The detected language code is:{language_code}")Text to Speech: Useconvert_text_to_speech(text)to convert text into speech.fromcommon-ml-functions.text_to_speechimportconvert_text_to_speechaudio_file_path=convert_text_to_speech("Hello, this is a test.")print(f"Audio file saved at:{audio_file_path}")Translate and Talk: Usetranslate_and_talk(text, target_language)to translate and convert text to speech.fromcommon-ml-functions.text_to_speechimporttranslate_and_talkaudio_file_path=translate_and_talk("This is a test.","es")print(f"Translated and converted to speech, file saved at:{audio_file_path}")Youtube Video Download: Useyb_download(url)to download YouTube videos.fromcommon-ml-functions.ybimportyb_downloadvideo_path=yb_download("https://www.youtube.com/watch?v=example")print(f"Video downloaded at:{video_path}")Detect Language and Translate: Combine detect and translate for detecting and translating text.fromcommon-ml-functions.languageimportdetect_and_translatetranslated_text=detect_and_translate("Bonjour le monde!","en")print(translated_text)Audio Enhancement: Useenhance_audio(audio_url, speed_boost, steps)for audio enhancement.fromcommon-ml-functions.audioimportenhance_audioenhanced_audio_path=enhance_audio("http://example.com/audio.mp3",True,50)print(f"Enhanced audio saved at:{enhanced_audio_path}")Visual question answering: Usevisual_question_answering(image_url, prompt)for visual Q&A.fromcommon-ml-functions.visualimportvisual_question_answeringanswer=visual_question_answering("http://example.com/image.jpg","What is depicted in this image?")print(answer)Contributing!Please consider contributing to this young and humble project!
Email any questions atandere.emi@gmail.com