<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3496259157130184660</id><updated>2026-05-03T15:36:00.313-07:00</updated><category term="AWS"/><category term="oracle"/><category term="Exadata"/><category term="Kubernetes"/><category term="ollama"/><category term="GCP"/><category term="OCI"/><category term="EKS"/><category term="Oracle Cloud"/><category term="database"/><category term="DevOps"/><category term="rag"/><category term="Azure"/><category term="llamaindex"/><category term="AWS EKS"/><category term="Cloud"/><category term="AWS RDS"/><category term="Amazon Bedrock"/><category term="12c"/><category term="AI"/><category term="Cloud Engineer"/><category term="Oracle 12c"/><category term="agentic"/><category term="huggingface"/><category term="GKE"/><category term="Generative AI"/><category term="GenerativeAI"/><category term="Oracle Performance Tuning"/><category term="cloudvanity"/><category term="graphrag"/><category term="ibmcloud"/><category term="oraclecloud"/><category term="Finops"/><category term="OKE"/><category term="Oracle 19c"/><category term="SQL"/><category term="blogging"/><category term="newsletter"/><category term="ASM"/><category term="AUSOUG"/><category term="Gitops"/><category term="GoldenGate"/><category term="K8s"/><category term="Linux"/><category term="OpenAI"/><category term="Oracle 11g"/><category term="Oracle 11gR2"/><category term="Oracle ACE"/><category term="Oracle Fusion Middleware 11g"/><category term="Oracle Pakistan"/><category term="Terraform"/><category term="chatgpt"/><category term="dba"/><category term="docker"/><category term="server"/><category term="11g"/><category term="ADR 11g"/><category term="AI RAG"/><category term="ARGO CD"/><category term="AWS Bedrock"/><category term="AWS CLI"/><category term="AWS Finops"/><category term="AWS SSM"/><category term="CBO"/><category term="CloudFormation"/><category term="CyberSecurity"/><category term="Dynamodb"/><category term="GenAI"/><category term="Git"/><category term="JSON"/><category term="LLM"/><category term="LangChain"/><category term="Log Buffer"/><category term="Oracle Application Server 10g"/><category term="Oracle DBA"/><category term="Oracle Exadata"/><category term="Oracle GoldenGate"/><category term="Oracle select ai"/><category term="PMON"/><category term="Pythian"/><category term="cohere"/><category term="fine-tuning"/><category term="haystack"/><category term="llama 3.1"/><category term="llama2"/><category term="mistral7b"/><category term="oracle 23ai"/><category term="qwen"/><category term="10g"/><category term="12c installation problem"/><category term="12c pluggable database"/><category term="AGI"/><category term="AI Transcription"/><category term="AKS"/><category term="AWS Aurora"/><category term="Cloud Security"/><category term="Codefresh"/><category term="Conference"/><category term="DORA"/><category term="ECS"/><category term="Exadata Jobs"/><category term="Exadata Pakistan"/><category term="F5TTS"/><category term="Flux"/><category term="Gen AI"/><category term="GoldenGate 23ai"/><category term="HunyuanVideo"/><category term="NoSQL"/><category term="OOW12"/><category term="Oracle AI"/><category term="Oracle Certification Karachi"/><category term="Oracle Cloud Database"/><category term="Oracle blockchain"/><category term="Oracle blockchain table"/><category term="Perth"/><category term="PostgreSQL"/><category term="Python"/><category term="RDS"/><category term="S3"/><category term="Smart Scan"/><category term="ai agents"/><category term="ai voice cloning"/><category term="bedrock"/><category term="blog"/><category term="cellcli"/><category term="code llama"/><category term="comfyui"/><category term="crewai"/><category term="crossplane"/><category term="crowdstrike"/><category term="data"/><category term="deep live cam"/><category term="deepseek"/><category term="deepseek r1"/><category term="ecoute"/><category term="exadata patching"/><category term="facefusion"/><category term="finetune llm"/><category term="function calling"/><category term="gemma"/><category term="gemma 7b"/><category term="gpt4omini"/><category term="gradient"/><category term="groq"/><category term="hunyuan"/><category term="idefics2"/><category term="lightrag"/><category term="live face swap"/><category term="llama-cpp-python"/><category term="llama3.1"/><category term="llm finetuning"/><category term="memory leak"/><category term="mistral"/><category term="mistral nemo"/><category term="mixtral"/><category term="nvidia"/><category term="ora-00600"/><category term="phi3"/><category term="quantization"/><category term="quanto"/><category term="real application cluster"/><category term="record"/><category term="rope pearl"/><category term="semantic kernel"/><category term="speaking"/><category term="sql server"/><category term="stable diffusion"/><category term="tom kyte"/><category term="tool use"/><category term="triplex"/><category term="tts"/><category term="unsloth"/><category term="vertex ai"/><category term="yum"/><category term="00600"/><category term="11g RAC"/><category term="12C RAC"/><category term="12G documentation"/><category term="12c enqueus"/><category term="12c listener problem"/><category term="12g DBA"/><category term="12g books"/><category term="12g download"/><category term="401 Authorization Required"/><category term="ADB-ExaC@C"/><category term="ADR"/><category term="AI Comics"/><category term="AI Game"/><category term="AI Job interview"/><category term="AMM"/><category term="ANZ"/><category term="ASM 12c"/><category term="ASM 18c"/><category term="AWR"/><category term="AWS Application Composer"/><category term="AWS Application Security"/><category term="AWS Athena"/><category term="AWS Athena tutorial"/><category term="AWS Blogs"/><category term="AWS Calculator"/><category term="AWS Cloud Architect Associate Exam"/><category term="AWS Cloud Architect Associate Exam preparation"/><category term="AWS EMR"/><category term="AWS Karpenter"/><category term="AWS Lambda"/><category term="AWS Lattice"/><category term="AWS Linter"/><category term="AWS Networking"/><category term="AWS Redshift"/><category term="AWS Resilience Hub"/><category term="AWS TNB"/><category term="AWS Telco Network Builder"/><category term="AWS Urdu"/><category term="AWS VPC"/><category term="AWS courses"/><category term="Accelerate book"/><category term="Accelerate book pdf"/><category term="Agentic RAG"/><category term="Alibaba"/><category term="Amazon Athena"/><category term="Amazon Aurora"/><category term="Amazon Aurora Serverless"/><category term="Amazon Linux 2"/><category term="Amazon Linux 2023"/><category term="Amazon Linux 3"/><category term="Amazon Linux 4"/><category term="Amazon Web Service"/><category term="Anthos"/><category term="Application Security"/><category term="ArtificialIntelligence"/><category term="Aurora"/><category term="Aurora PostgreSQL"/><category term="Azure Blogs"/><category term="BAAG"/><category term="BEA"/><category term="BP12"/><category term="BP13"/><category term="BP16"/><category term="Big Query"/><category term="BigQuery"/><category term="Bind Variable Peeking"/><category term="Bind Variables"/><category term="BuildKite"/><category term="CICD"/><category term="CIDR"/><category term="CIDR Formula. AWS"/><category term="CLOUDFRONT"/><category term="CORBA"/><category term="CRSCTL"/><category term="CVU 11g"/><category term="Cell Node ADR"/><category term="CfCT"/><category term="ChatGLM"/><category term="Cloud Blog Aggregator"/><category term="Cloud Carnival"/><category term="Cloud Cost Optimization"/><category term="Cloud DBA"/><category term="Cloud Engineer Interview"/><category term="Cloud Engineer Job"/><category term="Cloud Functions"/><category term="Cloud Interviews"/><category term="Cloud Jobs"/><category term="Cloud Vanity"/><category term="Cloudtrail"/><category term="Cluster Time Service"/><category term="Clustering Factor"/><category term="Cody"/><category term="Cost Optimization"/><category term="DBA Certification Pakistan"/><category term="DBA Pakistan"/><category term="DBRM"/><category term="DBaas"/><category term="Data Science"/><category term="De-Duplication"/><category term="Deepmind"/><category term="Document AI"/><category term="Dolly"/><category term="DragGan"/><category term="E2TTS"/><category term="E5-TTS"/><category term="E5TTS"/><category term="EBS Snapshot"/><category term="EFS"/><category term="EKS Karpenter"/><category term="Exadata 12c"/><category term="Exadata BP14"/><category term="Exadata Storage Server"/><category term="Exadata certification"/><category term="Exadata certification Australia"/><category term="Exadata certification sydney"/><category term="Exadata jobs Australia"/><category term="Exadata melbourne"/><category term="Exadata sydney"/><category term="Exalogic"/><category term="Exdata Perth"/><category term="F5-TTS"/><category term="FAILURE"/><category term="FAST NU"/><category term="FRA"/><category term="Falcon"/><category term="Flan-T5"/><category term="Flex CD"/><category term="Fluxcd"/><category term="Forms 6i"/><category term="Fusion Insights"/><category term="GCP  Blogs"/><category term="GDPR"/><category term="GPT-4o Mini"/><category term="GPnP Get Item"/><category term="GenApps"/><category term="Generative AI Agents"/><category term="Glacier"/><category term="GoldenGate Error"/><category term="GoldenGate Installation"/><category term="Google Cloud Platform"/><category term="Google Service Weaver"/><category term="HA"/><category term="HCC"/><category term="Hadoop"/><category term="Helm"/><category term="High Water Mark"/><category term="Histograms"/><category term="Hybrid Activations"/><category term="ILM"/><category term="IORM"/><category term="IPMI"/><category term="Insync"/><category term="Insync12"/><category term="JMESPATH"/><category term="JRockit"/><category term="Jonathan Lewis"/><category term="K9s"/><category term="KCNA"/><category term="Karpenter"/><category term="Kubernetes Urdu"/><category term="LOB 11g"/><category term="LUN"/><category term="Lightsail"/><category term="Lightsail for Research"/><category term="Linode Cloud"/><category term="Linode Kubernetes"/><category term="Lit-Parrot"/><category term="Local RAG"/><category term="ML"/><category term="MOS"/><category term="Metalink"/><category term="Metalink SR"/><category term="Mistral Large 2"/><category term="Mixtral 8x7B"/><category term="Mixtral8X7B"/><category term="MongoDB"/><category term="My Oracle Support"/><category term="MySQL"/><category term="NV-INGEST"/><category term="NZOUG"/><category term="NZOUG14"/><category term="OC4J"/><category term="OCA Pakistan"/><category term="OCDBA"/><category term="OCP Pakistan"/><category term="ODA"/><category term="OEL6"/><category term="OHS"/><category term="OID"/><category term="OLTP"/><category term="OOW"/><category term="OOW2011"/><category term="ORA-00240"/><category term="ORA-00494"/><category term="ORA-00700"/><category term="ORA-04031"/><category term="ORA-07445"/><category term="ORA-4031"/><category term="ORA-700"/><category term="OTN"/><category term="OTN Lounge"/><category term="OU"/><category term="OpSec"/><category term="Ora Tech"/><category term="Oracle 11g OCP"/><category term="Oracle 11g RAC"/><category term="Oracle 18c"/><category term="Oracle 21c"/><category term="Oracle 23c"/><category term="Oracle 6i"/><category term="Oracle ASM"/><category term="Oracle Apps R12"/><category term="Oracle Big Data"/><category term="Oracle Certification Lahore"/><category term="Oracle Certification Pakistan"/><category term="Oracle Cloud Blog"/><category term="Oracle Cloud Infrastructure"/><category term="Oracle Coherence"/><category term="Oracle DBA Pakistan"/><category term="Oracle Database 11g Release 2  Tips"/><category term="Oracle Database 11g Release 2 Installation"/><category term="Oracle Database 23ai"/><category term="Oracle Datawarehousing"/><category term="Oracle GDPR"/><category term="Oracle GI"/><category term="Oracle Kubernetes"/><category term="Oracle Kubernetes pricing"/><category term="Oracle Loader"/><category term="Oracle MIX"/><category term="Oracle ML"/><category term="Oracle Mobile Authenticator"/><category term="Oracle Open World 2009"/><category term="Oracle PSU"/><category term="Oracle Perth"/><category term="Oracle RAC"/><category term="Oracle RAC 11g"/><category term="Oracle RAG"/><category term="Oracle Report Server"/><category term="Oracle Reports"/><category term="Oracle Temp"/><category term="Oracle WebLogic Server"/><category term="Oracle WebLogic Server 11g"/><category term="Oracle with 20:20 Foresight"/><category term="PACKET"/><category term="PITR"/><category term="PMON Latch"/><category term="PROW"/><category term="PSU"/><category term="Pakistan Oracle"/><category term="Paul Vallee"/><category term="Performance Insights"/><category term="Phi 3.5 Vision"/><category term="PostgreSQL 15"/><category term="PostgreSQL on AWS"/><category term="Prompt"/><category term="Prompt Engineer"/><category term="Prompt Engineering"/><category term="PromptOps"/><category term="Prow Job"/><category term="RAPTOR"/><category term="RBAL Hang"/><category term="RMAN"/><category term="RMAN Tips"/><category term="RPO"/><category term="RTO"/><category term="Reinvent"/><category term="Reinvent 2023"/><category term="Remote Diagnostic Agent"/><category term="Resource Map"/><category term="SCT"/><category term="SD3"/><category term="SNS"/><category term="SQL Tuning"/><category term="SSIS"/><category term="Serverless"/><category term="Shell Scripts"/><category term="ShortGPT"/><category term="Sohaib Abbasi"/><category term="Solaris"/><category term="Solaris 11 Help"/><category term="Solaris 11 books"/><category term="Solaris 11 certification"/><category term="Solaris 11 faq"/><category term="Solaris 11 introduction"/><category term="Solaris 11 tutorial"/><category term="Sourcegraph"/><category term="StableLM"/><category term="StarCoder"/><category term="Stress"/><category term="Sydney Oracle Meetup"/><category term="Systems Manager"/><category term="TNB"/><category term="TNS-12518"/><category term="TNS-12571"/><category term="Tagging"/><category term="Terraform 2023"/><category term="Terraform Destroy"/><category term="Terraform Locals"/><category term="Terraform variables"/><category term="Transformer"/><category term="UUID"/><category term="VPC Lattice"/><category term="Vicuna"/><category term="WRITER"/><category term="Wget"/><category term="WizardLM"/><category term="Zsh"/><category term="acfs"/><category term="adalflow"/><category term="administration"/><category term="administrationphysical"/><category term="agenticdb"/><category term="agentless"/><category term="agentops"/><category term="ai agent"/><category term="ai database"/><category term="ai dubbing"/><category term="ai eval"/><category term="ai evals"/><category term="ai hub"/><category term="ai lip sync"/><category term="ai song cloning"/><category term="ai webscraping"/><category term="aiagents"/><category term="aichatbot"/><category term="aichatbots"/><category term="aider"/><category term="aievals"/><category term="airllm"/><category term="aitrain"/><category term="alert"/><category term="alibaba llm"/><category term="alphex"/><category term="amazon partyrock"/><category term="amazon titan"/><category term="amazon transcribe"/><category term="ansible"/><category term="anthropic"/><category term="anything llm"/><category term="anythingllm"/><category term="aphex 118b"/><category term="atrain"/><category term="audiocraft"/><category term="audiogen"/><category term="audioldm"/><category term="audioldm2"/><category term="auraflow"/><category term="autocoder"/><category term="autocoder installation"/><category term="autogen"/><category term="autonomous database"/><category term="autotrain"/><category term="autotrain advanced"/><category term="aws cloud pakistan"/><category term="aws pakistan"/><category term="aws partyrock"/><category term="aws sagemaker"/><category term="bedrock-runtime"/><category term="beyondllm"/><category term="blockchain"/><category term="blockchain table"/><category term="bloom filtering"/><category term="brainsurface"/><category term="call stack trace"/><category term="candle"/><category term="cargo"/><category term="celldisk"/><category term="cfn-lint"/><category term="chat gpt"/><category term="chat gtp"/><category term="chatgtp"/><category term="chattts"/><category term="checkpoint"/><category term="claude 3"/><category term="claude 4"/><category term="cloudwatch"/><category term="codd"/><category term="codellama"/><category term="codestral"/><category term="codestral mamba"/><category term="cogvideo"/><category term="cogvideox"/><category term="command r+"/><category term="command rplus"/><category term="compute nodes"/><category term="concurrency"/><category term="confusion"/><category term="connectivity"/><category term="corpuscreator"/><category term="crawl4ai"/><category term="ctags"/><category term="customllm"/><category term="dan"/><category term="dataset"/><category term="dataset creator"/><category term="datasets"/><category term="db_developer_role"/><category term="dbms"/><category term="dbms_cloud"/><category term="deepfake"/><category term="deeplivecam"/><category term="dept"/><category term="developer"/><category term="devin"/><category term="devopsgpt"/><category term="diagram"/><category term="dml"/><category term="dspy"/><category term="duckdb"/><category term="duckdb nsql"/><category term="ecout"/><category term="elevanlabs"/><category term="elevenlabs"/><category term="embedchain"/><category term="emc"/><category term="emp"/><category term="error"/><category term="event"/><category term="exadata cell patch"/><category term="exadata patch download"/><category term="exadata perth"/><category term="exadata v3"/><category term="exdata"/><category term="exl2"/><category term="exl3"/><category term="exllamav2"/><category term="exllamav3"/><category term="falcon180b"/><category term="fastrag"/><category term="ffmpeg"/><category term="finetune vlm"/><category term="finetuning"/><category term="firebase"/><category term="firewall"/><category term="fivetran"/><category term="flux1 dev"/><category term="flux1 pro"/><category term="flux1 schnell"/><category term="form"/><category term="fortify"/><category term="freewilly"/><category term="freewilly1"/><category term="freewilly2"/><category term="function"/><category term="gemma 2b"/><category term="gemma2b"/><category term="genkit"/><category term="gke-gcloud-auth-login"/><category term="goldengate 18c"/><category term="google cloud platform. google cloud pakistan"/><category term="google colab"/><category term="gpt4"/><category term="gpt4o"/><category term="gradientai"/><category term="gradio"/><category term="graphql"/><category term="griddisk"/><category term="groq8b"/><category term="hardware"/><category term="hindi llm"/><category term="history"/><category term="hqq"/><category term="html"/><category term="hugging face"/><category term="huggingace"/><category term="hunyuan3d"/><category term="i2v"/><category term="iAS"/><category term="iLOM"/><category term="idefics"/><category term="indic parler-tts"/><category term="install oracle 12c"/><category term="installation"/><category term="instance"/><category term="internal"/><category term="intersect"/><category term="islamabad"/><category term="isnan"/><category term="javascript"/><category term="kaggle"/><category term="karachi"/><category term="kathy sierra"/><category term="kdtalker"/><category term="keras"/><category term="kokoro"/><category term="kv cache"/><category term="langgraph"/><category term="latentsync"/><category term="librechat"/><category term="link"/><category term="lip sync video"/><category term="lip sync with ai"/><category term="listener"/><category term="live face swapping"/><category term="llama 3 groq"/><category term="llama 3.1 405b"/><category term="llama 3.1 70b"/><category term="llama cpp python"/><category term="llama-cpp-agent"/><category term="llama2 finetuning"/><category term="llama3"/><category term="llama3.2"/><category term="llamacpp"/><category term="llamagpt"/><category term="llamaindex workflows"/><category term="llm compiler"/><category term="llm function calling"/><category term="llm on mobile"/><category term="llm router"/><category term="llm tool calling"/><category term="llvm"/><category term="llvm ir"/><category term="local"/><category term="log"/><category term="logical"/><category term="long context"/><category term="lora"/><category term="lucid"/><category term="ludwig."/><category term="machine learning"/><category term="magic fixup"/><category term="magicquil"/><category term="magicquill"/><category term="management"/><category term="mark"/><category term="massedcompute"/><category term="mcp"/><category term="melanie caffrey"/><category term="mem0"/><category term="merge"/><category term="meta"/><category term="meta llama"/><category term="microsoft"/><category term="mineru"/><category term="minig"/><category term="minus"/><category term="mistraltiny"/><category term="model context protocol"/><category term="money"/><category term="mosaicml"/><category term="mpt-30b"/><category term="mpt30b"/><category term="mpt7b"/><category term="musicgen"/><category term="myllm"/><category term="native function"/><category term="nemo"/><category term="nemoclaw"/><category term="network"/><category term="nginx"/><category term="ngnix"/><category term="numeric"/><category term="nv ingest"/><category term="nvidia sana"/><category term="o&#39;reilly"/><category term="oca"/><category term="ocp"/><category term="online dpo"/><category term="onsubmit"/><category term="opatch"/><category term="openai . filesearch"/><category term="openclaw"/><category term="opendevin"/><category term="openlit"/><category term="openllm"/><category term="openorca"/><category term="openorcaplatypus"/><category term="openshell"/><category term="openvoice"/><category term="operator"/><category term="oplan"/><category term="orachk"/><category term="oracle cloud pakistan"/><category term="oracle data warehouse"/><category term="oracle digital assistant"/><category term="oracle enqueue"/><category term="oracle enterprise linux 6"/><category term="oracle functions"/><category term="oracle pluggable database"/><category term="oracle scheduler"/><category term="oracle university"/><category term="oracle vm"/><category term="oracle webinar"/><category term="oracle23ai"/><category term="orcaplatypus"/><category term="orphan sessions"/><category term="parler tts"/><category term="partyrock"/><category term="passion"/><category term="passionate"/><category term="patching"/><category term="patels"/><category term="pdf extraction toolkit"/><category term="perfoormance"/><category term="performance"/><category term="perplexica"/><category term="perth oracle"/><category term="petals"/><category term="pga"/><category term="phi"/><category term="php"/><category term="physicaldisk"/><category term="platypus2"/><category term="pman"/><category term="polars"/><category term="portability"/><category term="privatelink"/><category term="program"/><category term="prow job example"/><category term="pydantic"/><category term="pythia"/><category term="python polars"/><category term="qualcomm"/><category term="qualcomm ai hub"/><category term="query"/><category term="qwen 7b"/><category term="qwen 7b chat"/><category term="qwen omni"/><category term="qwen-agent"/><category term="qwen2"/><category term="qwen3"/><category term="qwenagent"/><category term="r2r"/><category term="rac"/><category term="rag me up"/><category term="ragtoriches"/><category term="read consistency"/><category term="read only ai"/><category term="research"/><category term="resource manager"/><category term="rittman"/><category term="rope pearl live"/><category term="routellm"/><category term="rust"/><category term="sagemaker"/><category term="sana"/><category term="sciphi"/><category term="scrapegraphiai"/><category term="searxng"/><category term="select ai"/><category term="selectai"/><category term="self management"/><category term="semantic function"/><category term="service"/><category term="sga"/><category term="shared"/><category term="shared pool"/><category term="simpletuner"/><category term="singing"/><category term="slack face swap"/><category term="smash"/><category term="soap"/><category term="soap summary"/><category term="space shooter game"/><category term="stabilityai"/><category term="stable code 3b"/><category term="stable video 4d"/><category term="stablecode"/><category term="stablediffusion"/><category term="storage servers"/><category term="sum small"/><category term="sundiag"/><category term="sv4d"/><category term="swappiness"/><category term="synk"/><category term="system"/><category term="teams face swap"/><category term="techno-ed"/><category term="tencent"/><category term="text to sql"/><category term="text to sql model"/><category term="textbase"/><category term="textbox"/><category term="tinyllama"/><category term="tinyllama 1.1b"/><category term="tinyllm"/><category term="tokenizer"/><category term="tool calling"/><category term="tow"/><category term="transcribe"/><category term="trl"/><category term="tuning"/><category term="ubuntu"/><category term="unicode"/><category term="union"/><category term="union all"/><category term="urdu llm"/><category term="us"/><category term="validating"/><category term="validation"/><category term="venerable"/><category term="virtual column"/><category term="virtualization"/><category term="virtues"/><category term="vlm"/><category term="vmware"/><category term="voicecraft"/><category term="vpc endpoints"/><category term="wan2.2. wan2.2 comfyui workflow"/><category term="webinar"/><category term="werf"/><category term="whisper"/><category term="whisper turbo"/><category term="workflows llamaindex"/><category term="xtts"/><category term="xtuner"/><category term="yaml"/><category term="zone alarm"/><category term="zoom face swap"/><title type='text'>Fahd Mirza on AI, Cloud, DevOps and Databases</title><subtitle type='html'>Blog By Fahd Mirza Chughtai</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>676</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-3447485300889112995</id><published>2026-03-18T21:42:00.000-07:00</published><updated>2026-03-18T21:42:08.021-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="nemoclaw"/><category scheme="http://www.blogger.com/atom/ns#" term="openclaw"/><category scheme="http://www.blogger.com/atom/ns#" term="openshell"/><title type='text'>NemoClaw Tutorial: Run Locally with Free Local Models: Easy Guide</title><content type='html'>&lt;p&gt;&amp;nbsp;This video locally installs NemoClaw with OpenShell and vllm Qwen3.5 9B.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;343&quot; src=&quot;https://www.youtube.com/embed/k1kl6xPb_HU&quot; width=&quot;476&quot; youtube-src-id=&quot;k1kl6xPb_HU&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/3447485300889112995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/3447485300889112995' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/3447485300889112995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/3447485300889112995'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2026/03/nemoclaw-tutorial-run-locally-with-free.html' title='NemoClaw Tutorial: Run Locally with Free Local Models: Easy Guide'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/k1kl6xPb_HU/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-4549918380980526105</id><published>2025-09-04T14:25:00.000-07:00</published><updated>2025-09-04T14:25:05.947-07:00</updated><title type='text'>Run Microsoft VibeVoice TTS Locally on CPU</title><content type='html'>&lt;p&gt;&amp;nbsp;In this tutorial, I install the Microsoft VibeVoice model locally and test.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;399&quot; src=&quot;https://www.youtube.com/embed/woZK76EJ47k&quot; width=&quot;479&quot; youtube-src-id=&quot;woZK76EJ47k&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;app.py:&lt;/p&gt;&lt;p&gt;&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;VibeVoice with Fahd Mirza&lt;/p&gt;&lt;p&gt;&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;import argparse&lt;/p&gt;&lt;p&gt;import os&lt;/p&gt;&lt;p&gt;import tempfile&lt;/p&gt;&lt;p&gt;import time&lt;/p&gt;&lt;p&gt;import threading&lt;/p&gt;&lt;p&gt;import subprocess&lt;/p&gt;&lt;p&gt;import numpy as np&lt;/p&gt;&lt;p&gt;import gradio as gr&lt;/p&gt;&lt;p&gt;import librosa&lt;/p&gt;&lt;p&gt;import soundfile as sf&lt;/p&gt;&lt;p&gt;import torch&lt;/p&gt;&lt;p&gt;from pathlib import Path&lt;/p&gt;&lt;p&gt;from typing import Iterator, Dict, Any&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;# Clone and setup VibeVoice if not already present&lt;/p&gt;&lt;p&gt;vibevoice_dir = Path(&#39;./VibeVoice&#39;)&lt;/p&gt;&lt;p&gt;if not vibevoice_dir.exists():&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; print(&quot;Cloning VibeVoice repository...&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; subprocess.run([&#39;git&#39;, &#39;clone&#39;, &#39;https://github.com/vibevoice-community/VibeVoice&#39;], check=True)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; print(&quot;Installing VibeVoice...&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; subprocess.run([&#39;pip&#39;, &#39;install&#39;, &#39;-e&#39;, &#39;./VibeVoice&#39;], check=True)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; print(&quot;Installing wheel (required for flash-attn)...&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; subprocess.run([&#39;pip&#39;, &#39;install&#39;, &#39;wheel&#39;], check=True)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; print(&quot;Installing flash-attn...&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; try:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; subprocess.run([&#39;pip&#39;, &#39;install&#39;, &#39;flash-attn&#39;, &#39;--no-build-isolation&#39;], check=True)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; except subprocess.CalledProcessError:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&quot;Warning: flash-attn installation failed. Continuing without it...&quot;)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;# Add the VibeVoice directory to path&lt;/p&gt;&lt;p&gt;import sys&lt;/p&gt;&lt;p&gt;sys.path.insert(0, str(vibevoice_dir))&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;# Import VibeVoice modules&lt;/p&gt;&lt;p&gt;try:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; from vibevoice.modular.configuration_vibevoice import VibeVoiceConfig&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; from vibevoice.modular.modeling_vibevoice_inference import VibeVoiceForConditionalGenerationInference&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; from vibevoice.processor.vibevoice_processor import VibeVoiceProcessor&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; from vibevoice.modular.streamer import AudioStreamer&lt;/p&gt;&lt;p&gt;except ImportError:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; try:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; import importlib.util&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def load_module(module_name, file_path):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; spec = importlib.util.spec_from_file_location(module_name, file_path)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; module = importlib.util.module_from_spec(spec)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sys.modules[module_name] = module&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; spec.loader.exec_module(module)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return module&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; config_module = load_module(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;vibevoice_config&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vibevoice_dir / &quot;modular&quot; / &quot;configuration_vibevoice.py&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VibeVoiceConfig = config_module.VibeVoiceConfig&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; model_module = load_module(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;vibevoice_model&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vibevoice_dir / &quot;modular&quot; / &quot;modeling_vibevoice_inference.py&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VibeVoiceForConditionalGenerationInference = model_module.VibeVoiceForConditionalGenerationInference&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; processor_module = load_module(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;vibevoice_processor&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vibevoice_dir / &quot;processor&quot; / &quot;vibevoice_processor.py&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VibeVoiceProcessor = processor_module.VibeVoiceProcessor&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; streamer_module = load_module(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;vibevoice_streamer&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vibevoice_dir / &quot;modular&quot; / &quot;streamer.py&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AudioStreamer = streamer_module.AudioStreamer&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; except Exception as e:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; raise ImportError(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; f&quot;VibeVoice module not found. Error: {e}\n&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Please ensure VibeVoice is properly installed:\n&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;git clone https://github.com/vibevoice-community/VibeVoice\n&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;cd VibeVoice/\n&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;pip install -e .\n&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;from transformers.utils import logging&lt;/p&gt;&lt;p&gt;from transformers import set_seed&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;logging.set_verbosity_info()&lt;/p&gt;&lt;p&gt;logger = logging.get_logger(__name__)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;class VibeVoiceChat:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; def __init__(self, model_path: str, device: str = &quot;cuda&quot;, inference_steps: int = 5):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&quot;&quot;Initialize the VibeVoice chat model.&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.model_path = model_path&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.device = device if torch.cuda.is_available() else &quot;cpu&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.inference_steps = inference_steps&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.is_generating = False&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.stop_generation = False&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.current_streamer = None&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Check GPU availability and CUDA version&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if torch.cuda.is_available():&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;✓ GPU detected: {torch.cuda.get_device_name(0)}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;&amp;nbsp; Memory: {torch.cuda.get_device_properties(0).total_memory / 1e9:.2f} GB&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;&amp;nbsp; CUDA Version: {torch.version.cuda}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;&amp;nbsp; PyTorch CUDA: {torch.cuda.is_available()}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Set memory fraction to avoid OOM&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; torch.cuda.set_per_process_memory_fraction(0.95)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Enable TF32 for faster computation on Ampere GPUs&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; torch.backends.cuda.matmul.allow_tf32 = True&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; torch.backends.cudnn.allow_tf32 = True&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&quot;✗ No GPU detected, using CPU (generation will be VERY slow)&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&quot;&amp;nbsp; For faster generation, ensure CUDA is properly installed&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.load_model()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.setup_voice_presets()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; def load_model(self):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&quot;&quot;Load the VibeVoice model and processor.&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;Loading model from {self.model_path}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; start_time = time.time()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.processor = VibeVoiceProcessor.from_pretrained(self.model_path)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if torch.cuda.is_available():&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&quot;Loading model with GPU acceleration...&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.model = VibeVoiceForConditionalGenerationInference.from_pretrained(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.model_path,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; torch_dtype=torch.bfloat16,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; device_map=&#39;cuda:0&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; attn_implementation=&quot;flash_attention_2&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; low_cpu_mem_usage=True,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&quot;✓ Flash Attention 2 enabled for faster generation&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; except Exception as e:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;Warning: Could not load with flash_attention_2: {e}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&quot;Falling back to standard attention...&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.model = VibeVoiceForConditionalGenerationInference.from_pretrained(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.model_path,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; torch_dtype=torch.bfloat16,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; device_map=&#39;cuda:0&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; low_cpu_mem_usage=True,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&quot;Loading model on CPU (this will be slow)...&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.model = VibeVoiceForConditionalGenerationInference.from_pretrained(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.model_path,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; torch_dtype=torch.float32,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; device_map=&#39;cpu&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; low_cpu_mem_usage=True,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.model.eval()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Configure noise scheduler for faster inference&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.model.model.noise_scheduler = self.model.model.noise_scheduler.from_config(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.model.model.noise_scheduler.config,&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; algorithm_type=&#39;sde-dpmsolver++&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; beta_schedule=&#39;squaredcos_cap_v2&#39;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.model.set_ddpm_inference_steps(num_steps=self.inference_steps)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; load_time = time.time() - start_time&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;✓ Model loaded in {load_time:.2f} seconds&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Print model device&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if hasattr(self.model, &#39;device&#39;):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;Model device: {self.model.device}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; def setup_voice_presets(self):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&quot;&quot;Setup voice presets from the voices directory.&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; voices_dir = os.path.join(os.path.dirname(__file__), &quot;voices&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Create voices directory if it doesn&#39;t exist&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not os.path.exists(voices_dir):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; os.makedirs(voices_dir)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;Created voices directory at {voices_dir}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&quot;Please add voice sample files (.wav, .mp3, etc.) to this directory&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.available_voices = {}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_extensions = (&#39;.wav&#39;, &#39;.mp3&#39;, &#39;.flac&#39;, &#39;.ogg&#39;, &#39;.m4a&#39;, &#39;.aac&#39;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Scan for audio files&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for file in os.listdir(voices_dir):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if file.lower().endswith(audio_extensions):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name = os.path.splitext(file)[0]&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.available_voices[name] = os.path.join(voices_dir, file)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Sort voices alphabetically&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.available_voices = dict(sorted(self.available_voices.items()))&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not self.available_voices:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;Warning: No voice files found in {voices_dir}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&quot;Using default (zero) voice samples. Add audio files to the voices directory for better results.&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Add a default &quot;None&quot; option&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.available_voices = {&quot;Default&quot;: None}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;Found {len(self.available_voices)} voice presets: {&#39;, &#39;.join(self.available_voices.keys())}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; def read_audio(self, audio_path: str, target_sr: int = 24000) -&amp;gt; np.ndarray:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&quot;&quot;Read and preprocess audio file.&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wav, sr = sf.read(audio_path)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if len(wav.shape) &amp;gt; 1:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wav = np.mean(wav, axis=1)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if sr != target_sr:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wav = librosa.resample(wav, orig_sr=sr, target_sr=target_sr)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return wav&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; except Exception as e:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;Error reading audio {audio_path}: {e}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return np.zeros(24000)&amp;nbsp; # Return 1 second of silence as fallback&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; def format_script(self, message: str, num_speakers: int = 2) -&amp;gt; str:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&quot;&quot;Format input message into a script with speaker assignments.&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lines = message.strip().split(&#39;\n&#39;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; formatted_lines = []&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for i, line in enumerate(lines):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line = line.strip()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not line:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Check if already formatted&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if line.startswith(&#39;Speaker &#39;) and &#39;:&#39; in line:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; formatted_lines.append(line)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Auto-assign speakers in rotation&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; speaker_id = i % num_speakers&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; formatted_lines.append(f&quot;Speaker {speaker_id}: {line}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &#39;\n&#39;.join(formatted_lines)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; def generate_audio_stream(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self,&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; message: str,&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; history: list,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; voice_1: str,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; voice_2: str,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; num_speakers: int,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cfg_scale: float&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ) -&amp;gt; Iterator[tuple]:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&quot;&quot;Generate audio stream from text input.&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.stop_generation = False&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.is_generating = True&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Validate inputs&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not message.strip():&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yield None&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Format the script&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; formatted_script = self.format_script(message, num_speakers)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;Formatted script:\n{formatted_script}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;Using device: {self.device}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Start timing&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; start_time = time.time()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Select voices based on number of speakers&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selected_voices = []&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if voice_1 and voice_1 != &quot;Default&quot;:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selected_voices.append(voice_1)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if num_speakers &amp;gt; 1 and voice_2 and voice_2 != &quot;Default&quot;:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selected_voices.append(voice_2)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Load voice samples&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; voice_samples = []&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for i in range(num_speakers):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Use the appropriate voice for each speaker&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if i &amp;lt; len(selected_voices):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; voice_name = selected_voices[i]&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if voice_name in self.available_voices and self.available_voices[voice_name]:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_data = self.read_audio(self.available_voices[voice_name])&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_data = np.zeros(24000)&amp;nbsp; # Default silence&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Use first voice or default if not enough voices selected&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if selected_voices and selected_voices[0] in self.available_voices and self.available_voices[selected_voices[0]]:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_data = self.read_audio(self.available_voices[selected_voices[0]])&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_data = np.zeros(24000)&amp;nbsp; # Default silence&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; voice_samples.append(audio_data)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;Loaded {len(voice_samples)} voice samples&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Process inputs&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inputs = self.processor(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; text=[formatted_script],&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; voice_samples=[voice_samples],&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; padding=True,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return_tensors=&quot;pt&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return_attention_mask=True,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Move to device and ensure correct dtype&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if self.device == &quot;cuda&quot;:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inputs = {k: v.to(self.device) if torch.is_tensor(v) else v for k, v in inputs.items()}&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;✓ Inputs moved to GPU&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Check GPU memory&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if torch.cuda.is_available():&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;GPU memory allocated: {torch.cuda.memory_allocated() / 1e9:.2f} GB&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Create audio streamer&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_streamer = AudioStreamer(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; batch_size=1,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stop_signal=None,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeout=None&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.current_streamer = audio_streamer&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Start generation in separate thread&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; generation_thread = threading.Thread(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; target=self._generate_with_streamer,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; args=(inputs, cfg_scale, audio_streamer)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; generation_thread.start()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Wait briefly for generation to start&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; time.sleep(1)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Stream audio chunks&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sample_rate = 24000&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_stream = audio_streamer.get_stream(0)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; all_audio_chunks = []&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chunk_count = 0&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for audio_chunk in audio_stream:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if self.stop_generation:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_streamer.end()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chunk_count += 1&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Convert to numpy&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if torch.is_tensor(audio_chunk):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if audio_chunk.dtype == torch.bfloat16:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_chunk = audio_chunk.float()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_np = audio_chunk.cpu().numpy().astype(np.float32)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_np = np.array(audio_chunk, dtype=np.float32)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Ensure 1D&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if len(audio_np.shape) &amp;gt; 1:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_np = audio_np.squeeze()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Convert to 16-bit&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_16bit = self.convert_to_16_bit_wav(audio_np)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; all_audio_chunks.append(audio_16bit)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Yield accumulated audio&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if all_audio_chunks:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; complete_audio = np.concatenate(all_audio_chunks)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yield (sample_rate, complete_audio)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Wait for generation to complete&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; generation_thread.join(timeout=5.0)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Final yield with complete audio&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if all_audio_chunks:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; complete_audio = np.concatenate(all_audio_chunks)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; generation_time = time.time() - start_time&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_duration = len(complete_audio) / sample_rate&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;✓ Generation complete:&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;&amp;nbsp; Time taken: {generation_time:.2f} seconds&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;&amp;nbsp; Audio duration: {audio_duration:.2f} seconds&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;&amp;nbsp; Real-time factor: {audio_duration/generation_time:.2f}x&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yield (sample_rate, complete_audio)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.current_streamer = None&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.is_generating = False&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; except Exception as e:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;Error in generation: {e}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; import traceback&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; traceback.print_exc()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.is_generating = False&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.current_streamer = None&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yield None&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; def _generate_with_streamer(self, inputs, cfg_scale, audio_streamer):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&quot;&quot;Helper method to run generation with streamer.&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def check_stop():&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return self.stop_generation&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Use torch.cuda.amp for mixed precision if available&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if self.device == &quot;cuda&quot; and torch.cuda.is_available():&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; with torch.cuda.amp.autocast(dtype=torch.bfloat16):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; outputs = self.model.generate(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; **inputs,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; max_new_tokens=None,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cfg_scale=cfg_scale,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tokenizer=self.processor.tokenizer,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; generation_config={&#39;do_sample&#39;: False},&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_streamer=audio_streamer,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stop_check_fn=check_stop,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; verbose=False,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; refresh_negative=True,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; outputs = self.model.generate(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; **inputs,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; max_new_tokens=None,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cfg_scale=cfg_scale,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tokenizer=self.processor.tokenizer,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; generation_config={&#39;do_sample&#39;: False},&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_streamer=audio_streamer,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stop_check_fn=check_stop,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; verbose=False,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; refresh_negative=True,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; except Exception as e:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;Error in generation thread: {e}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; import traceback&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; traceback.print_exc()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_streamer.end()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; def convert_to_16_bit_wav(self, data):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&quot;&quot;Convert audio data to 16-bit WAV format.&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if torch.is_tensor(data):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data = data.detach().cpu().numpy()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data = np.array(data)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if np.max(np.abs(data)) &amp;gt; 1.0:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data = data / np.max(np.abs(data))&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data = (data * 32767).astype(np.int16)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return data&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; def stop_audio_generation(self):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&quot;&quot;Stop the current audio generation.&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.stop_generation = True&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if self.current_streamer:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.current_streamer.end()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; except:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pass&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;def create_chat_interface(chat_instance: VibeVoiceChat):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &quot;&quot;&quot;Create a simplified Gradio ChatInterface for VibeVoice.&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; # Get available voices&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; voice_options = list(chat_instance.available_voices.keys())&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if not voice_options:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; voice_options = [&quot;Default&quot;]&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; default_voice_1 = voice_options[0] if len(voice_options) &amp;gt; 0 else &quot;Default&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; default_voice_2 = voice_options[1] if len(voice_options) &amp;gt; 1 else voice_options[0]&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; # Define the chat function that returns audio&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; def chat_fn(message: str, history: list, voice_1: str, voice_2: str, num_speakers: int, cfg_scale: float):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&quot;&quot;Process chat message and generate audio response.&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Extract text from message&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if isinstance(message, dict):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; text = message.get(&quot;text&quot;, &quot;&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; text = message&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not text.strip():&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Generate audio stream&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_generator = chat_instance.generate_audio_stream(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; text, history, voice_1, voice_2, num_speakers, cfg_scale&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Collect all audio data&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_data = None&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for audio_chunk in audio_generator:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if audio_chunk is not None:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_data = audio_chunk&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Return audio file path or error message&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if audio_data:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Save audio to temporary file&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; with tempfile.NamedTemporaryFile(suffix=&quot;.wav&quot;, delete=False) as tmp_file:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sample_rate, audio_array = audio_data&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sf.write(tmp_file.name, audio_array, sample_rate)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Return the file path directly&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return tmp_file.name&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &quot;Failed to generate audio&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; except Exception as e:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(f&quot;Error in chat_fn: {e}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; import traceback&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; traceback.print_exc()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return f&quot;Error: {str(e)}&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; # Create the interface using Blocks for more control&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; with gr.Blocks(theme=gr.themes.Soft(primary_hue=&quot;blue&quot;, secondary_hue=&quot;purple&quot;), fill_height=True) as interface:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr.Markdown(&quot;# 🎙️ VibeVoice Chat\nGenerate natural dialogue audio with AI voices&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; with gr.Row():&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; with gr.Column(scale=1):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr.Markdown(&quot;### Voice &amp;amp; Generation Settings&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; voice_1 = gr.Dropdown(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; choices=voice_options,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value=default_voice_1,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; label=&quot;Voice 1&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info=&quot;Select voice for Speaker 0&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; voice_2 = gr.Dropdown(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; choices=voice_options,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value=default_voice_2,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; label=&quot;Voice 2&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info=&quot;Select voice for Speaker 1 (if using multiple speakers)&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; num_speakers = gr.Slider(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; minimum=1,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; maximum=2,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value=2,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; step=1,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; label=&quot;Number of Speakers&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info=&quot;Number of speakers in the dialogue&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cfg_scale = gr.Slider(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; minimum=1.0,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; maximum=2.0,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value=1.3,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; step=0.05,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; label=&quot;CFG Scale&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; info=&quot;Guidance strength (higher = more adherence to text)&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; with gr.Column(scale=2):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chatbot = gr.Chatbot(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; label=&quot;Conversation&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; height=400,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type=&quot;messages&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; elem_id=&quot;chatbot&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; msg = gr.Textbox(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; label=&quot;Message&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; placeholder=&quot;Type your message or paste a script...&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lines=3&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_output = gr.Audio(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; label=&quot;Generated Audio&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type=&quot;filepath&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; autoplay=True,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; visible=False&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; with gr.Row():&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; submit = gr.Button(&quot;🎵 Generate Audio&quot;, variant=&quot;primary&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; clear = gr.Button(&quot;🗑️ Clear&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Example messages&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; gr.Examples(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; examples=[&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Hello! How are you doing today?&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Speaker 0: Welcome to our podcast!\nSpeaker 1: Thanks for having me!&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Tell me an interesting fact about space.&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;What&#39;s your favorite type of music and why?&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inputs=msg,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; label=&quot;Example Messages&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Set up event handlers&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def process_and_display(message, history, voice_1, voice_2, num_speakers, cfg_scale):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;&quot;&quot;Process message and update both chatbot and audio.&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Add user message to history&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; history = history or []&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; history.append({&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: message})&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Generate audio&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; audio_path = chat_fn(message, history, voice_1, voice_2, num_speakers, cfg_scale)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Add assistant response with audio&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if audio_path and audio_path.endswith(&#39;.wav&#39;):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; history.append({&quot;role&quot;: &quot;assistant&quot;, &quot;content&quot;: f&quot;🎵 Audio generated successfully&quot;})&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return history, audio_path, gr.update(visible=True), &quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; history.append({&quot;role&quot;: &quot;assistant&quot;, &quot;content&quot;: audio_path or &quot;Failed to generate audio&quot;})&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return history, None, gr.update(visible=False), &quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; submit.click(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fn=process_and_display,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inputs=[msg, chatbot, voice_1, voice_2, num_speakers, cfg_scale],&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; outputs=[chatbot, audio_output, audio_output, msg],&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queue=True&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; msg.submit(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fn=process_and_display,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inputs=[msg, chatbot, voice_1, voice_2, num_speakers, cfg_scale],&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; outputs=[chatbot, audio_output, audio_output, msg],&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; queue=True&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; clear.click(lambda: ([], None, gr.update(visible=False)), outputs=[chatbot, audio_output, audio_output])&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return interface&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;def parse_args():&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; parser = argparse.ArgumentParser(description=&quot;VibeVoice Chat Interface&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; parser.add_argument(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;--model_path&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type=str,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default=&quot;microsoft/VibeVoice-1.5B&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; help=&quot;Path to the VibeVoice model&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; parser.add_argument(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;--device&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type=str,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default=&quot;cuda&quot; if torch.cuda.is_available() else &quot;cpu&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; help=&quot;Device for inference&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; parser.add_argument(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;--inference_steps&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type=int,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default=5,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; help=&quot;Number of DDPM inference steps (lower = faster, higher = better quality)&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return parser.parse_args()&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;def main():&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &quot;&quot;&quot;Main function to run the chat interface.&quot;&quot;&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; args = parse_args()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; set_seed(42)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; print(&quot;🎙️ Initializing VibeVoice Chat Interface...&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; # Initialize chat instance&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; chat_instance = VibeVoiceChat(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; model_path=args.model_path,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; device=args.device,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inference_steps=args.inference_steps&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; # Create interface&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; interface = create_chat_interface(chat_instance)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; print(f&quot;🚀 Launching chat interface&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; print(f&quot;📁 Model: {args.model_path}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; print(f&quot;💻 Device: {chat_instance.device}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; print(f&quot;🔢 Inference steps: {args.inference_steps}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; print(f&quot;🎭 Available voices: {len(chat_instance.available_voices)}&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if chat_instance.device == &quot;cpu&quot;:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&quot;\n⚠️&amp;nbsp; WARNING: Running on CPU - generation will be VERY slow!&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&quot;&amp;nbsp; &amp;nbsp;For faster generation, ensure you have:&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&quot;&amp;nbsp; &amp;nbsp;1. NVIDIA GPU with CUDA support&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&quot;&amp;nbsp; &amp;nbsp;2. PyTorch with CUDA installed: pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118&quot;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; # Launch the interface&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; interface.queue(max_size=10).launch(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show_error=True,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; quiet=False,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;if __name__ == &quot;__main__&quot;:&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; main()&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/4549918380980526105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/4549918380980526105' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/4549918380980526105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/4549918380980526105'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/09/run-microsoft-vibevoice-tts-locally-on.html' title='Run Microsoft VibeVoice TTS Locally on CPU'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/woZK76EJ47k/default.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-5970894305714822194</id><published>2025-07-28T14:10:00.000-07:00</published><updated>2025-07-30T16:50:51.448-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="wan2.2. wan2.2 comfyui workflow"/><title type='text'>Install Wan2.2 Locally with Free ComfyUI Workflow: Text-to-Video and Image-to-Video</title><content type='html'>&lt;p&gt;&lt;span face=&quot;Roboto, Noto, sans-serif&quot; style=&quot;background-color: #282828; color: white; font-size: 15px; white-space-collapse: preserve;&quot;&gt;This video locally installs Wan2.2, which is the premier video foundation model.&lt;/span&gt;&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;376&quot; src=&quot;https://www.youtube.com/embed/JukIN2g-w-M&quot; width=&quot;452&quot; youtube-src-id=&quot;JukIN2g-w-M&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Models :&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/tree/main/split_files&quot;&gt;Comfy-Org/Wan_2.2_ComfyUI_Repackaged at main&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Workflow:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;https://github.com/fahdmirza/comfyuiworkflows&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/5970894305714822194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/5970894305714822194' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/5970894305714822194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/5970894305714822194'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/07/install-wan22-locally-with-free-comfyui.html' title='Install Wan2.2 Locally with Free ComfyUI Workflow: Text-to-Video and Image-to-Video'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/JukIN2g-w-M/default.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-1777578636095289625</id><published>2025-07-07T14:42:00.000-07:00</published><updated>2025-07-07T14:42:19.916-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ai eval"/><category scheme="http://www.blogger.com/atom/ns#" term="ai evals"/><category scheme="http://www.blogger.com/atom/ns#" term="aievals"/><title type='text'>AI Evals: Step-by-Step Tutorial for Everyone with Hands-on Demo</title><content type='html'>&lt;p&gt;Learn what AI evals are, why they matter, and build your first evaluation test using OpenAI&#39;s framework in under 10 minutes.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;358&quot; src=&quot;https://www.youtube.com/embed/xPZLYkuWUr8&quot; width=&quot;483&quot; youtube-src-id=&quot;xPZLYkuWUr8&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/1777578636095289625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/1777578636095289625' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/1777578636095289625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/1777578636095289625'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/07/ai-evals-step-by-step-tutorial-for.html' title='AI Evals: Step-by-Step Tutorial for Everyone with Hands-on Demo'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/xPZLYkuWUr8/default.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-6133328120905057662</id><published>2025-04-04T20:38:00.000-07:00</published><updated>2025-04-04T20:38:10.833-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mcp"/><category scheme="http://www.blogger.com/atom/ns#" term="model context protocol"/><title type='text'>How-To Build MCP Server and Client: Step-by-Step Simple Tutorial</title><content type='html'>&lt;p&gt;This video is a step-by-step very simple tutorial on Anthropic&#39;s Model Context Protocol (MCP) with a hello-world and then a real-world example.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;374&quot; src=&quot;https://www.youtube.com/embed/C2UnDOt-f3M&quot; width=&quot;450&quot; youtube-src-id=&quot;C2UnDOt-f3M&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/fahdmirza/mcp&quot;&gt;fahdmirza/mcp: Code for Easiest Tutorial on Model Context Protocol (MCP)&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/6133328120905057662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/6133328120905057662' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/6133328120905057662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/6133328120905057662'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/04/how-to-build-mcp-server-and-client-step.html' title='How-To Build MCP Server and Client: Step-by-Step Simple Tutorial'/><author><name>Fahd Mirza Chughtai</name><uri>http://www.blogger.com/profile/03083861859898991937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/C2UnDOt-f3M/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-1488056837344704533</id><published>2025-03-27T15:07:00.000-07:00</published><updated>2025-03-27T15:07:26.241-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="qwen omni"/><title type='text'>Qwen2.5-Omni 7B - Run Easily Locally or in Google Colab</title><content type='html'>&lt;p&gt;&amp;nbsp;This video locally installs Qwen2.5-Omni in a jupyter notebook. You can use same commands in Google Colab, Kaggle, etc.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;353&quot; src=&quot;https://www.youtube.com/embed/wcTDPduyUOo&quot; width=&quot;477&quot; youtube-src-id=&quot;wcTDPduyUOo&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;div&gt;conda create &lt;span style=&quot;color: #d4d4d4;&quot;&gt;-&lt;/span&gt;n qwen_omni python&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;3.10&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;-&lt;/span&gt;y &lt;span style=&quot;color: #f44747;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; conda activate qwen_omni&lt;/div&gt;&lt;br /&gt;&lt;div&gt;pip install torch torchvision torchaudio &lt;span style=&quot;color: #f44747;&quot;&gt;--&lt;/span&gt;index&lt;span style=&quot;color: #d4d4d4;&quot;&gt;-&lt;/span&gt;url https:&lt;span style=&quot;color: #d4d4d4;&quot;&gt;//&lt;/span&gt;download.pytorch.org&lt;span style=&quot;color: #d4d4d4;&quot;&gt;/&lt;/span&gt;whl&lt;span style=&quot;color: #d4d4d4;&quot;&gt;/&lt;/span&gt;cu121&lt;/div&gt;&lt;div&gt;pip install pillow accelerate soundfile&lt;/div&gt;&lt;div&gt;pip install git&lt;span style=&quot;color: #d4d4d4;&quot;&gt;+&lt;/span&gt;https:&lt;span style=&quot;color: #d4d4d4;&quot;&gt;//&lt;/span&gt;github.com&lt;span style=&quot;color: #d4d4d4;&quot;&gt;/&lt;/span&gt;huggingface&lt;span style=&quot;color: #d4d4d4;&quot;&gt;/&lt;/span&gt;transformers&lt;span style=&quot;color: #d4d4d4;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: #f44747;&quot;&gt;3a1ead0aabed473eafe527915eea8c197d424356&lt;/span&gt;&lt;/div&gt;&lt;div&gt;pip install &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;qwen-omni-utils[decord]&quot;&lt;/span&gt; librosa ipywidgets notebook&lt;/div&gt;&lt;div&gt;pip install &lt;span style=&quot;color: #d4d4d4;&quot;&gt;-&lt;/span&gt;U flash&lt;span style=&quot;color: #d4d4d4;&quot;&gt;-&lt;/span&gt;attn &lt;span style=&quot;color: #f44747;&quot;&gt;--&lt;/span&gt;no&lt;span style=&quot;color: #d4d4d4;&quot;&gt;-&lt;/span&gt;build&lt;span style=&quot;color: #d4d4d4;&quot;&gt;-&lt;/span&gt;isolation&lt;/div&gt;&lt;br /&gt;&lt;div&gt;jupyter notebook&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Run following commands &lt;span style=&quot;color: #569cd6;&quot;&gt;in&lt;/span&gt; notebook cells:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; torch&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; soundfile &lt;span style=&quot;color: #c586c0;&quot;&gt;as&lt;/span&gt; sf&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt; transformers &lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; Qwen2_5OmniModel, Qwen2_5OmniProcessor&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt; qwen_omni_utils &lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; process_mm_info&lt;/div&gt;&lt;br /&gt;&lt;div&gt;model &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; Qwen2_5OmniModel.from_pretrained(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Qwen/Qwen2.5-Omni-7B&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;torch_dtype&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;torch.bfloat16,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;device_map&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;auto&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;attn_implementation&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;flash_attention_2&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;enable_audio_output&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;True&lt;/span&gt;&lt;/div&gt;&lt;div&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;processor &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; Qwen2_5OmniProcessor.from_pretrained(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Qwen/Qwen2.5-Omni-7B&quot;&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;conversation &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; [&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;role&quot;&lt;/span&gt;: &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;system&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;content&quot;&lt;/span&gt;: &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;You are Qwen, a virtual human developed by the Qwen Team, Alibaba Group, capable of perceiving auditory and visual inputs, as well as generating text and speech. Please always respond in English.&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; },&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;role&quot;&lt;/span&gt;: &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;user&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;content&quot;&lt;/span&gt;: [{&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;video&quot;&lt;/span&gt;, &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;video&quot;&lt;/span&gt;: &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;./fahdvideo.mp4&quot;&lt;/span&gt;}]&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;]&lt;/div&gt;&lt;br /&gt;&lt;div&gt;text &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; processor.apply_chat_template(conversation, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;add_generation_prompt&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;True&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;tokenize&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;False&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;audios, images, videos &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; process_mm_info(conversation, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;use_audio_in_video&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;True&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;inputs &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; processor(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;text, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;audios&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;audios, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;images&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;images, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;videos&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;videos,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;return_tensors&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;pt&quot;&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;padding&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;True&lt;/span&gt;).to(model.device).to(model.dtype)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;with&lt;/span&gt; torch.no_grad():&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; text_ids, audio &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; model.generate(&lt;span style=&quot;color: #d4d4d4;&quot;&gt;**&lt;/span&gt;inputs, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;use_audio_in_video&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;True&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;spk&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Chelsie&quot;&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;output_text &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; processor.batch_decode(text_ids, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;skip_special_tokens&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;True&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;clean_up_tokenization_spaces&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;False&lt;/span&gt;)[&lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;]&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;🌟 Qwen Omni Response:&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;, output_text)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;sf.write(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;output.wav&quot;&lt;/span&gt;, audio.reshape(&lt;span style=&quot;color: #d4d4d4;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;).detach().cpu().numpy(), &lt;span style=&quot;color: #9cdcfe;&quot;&gt;samplerate&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;24000&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;✅ Audio saved to output.wav&quot;&lt;/span&gt;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;For Audio:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; librosa&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt; IPython.display &lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; Audio, display&lt;/div&gt;&lt;br /&gt;&lt;div&gt;audio_path &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;/home/Ubuntu/audio/cough.wav&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;prompt &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Classify the given human vocal sound in English.&quot;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;audio, sr &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; librosa.load(audio_path, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;sr&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;16000&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;display(Audio(audio, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;rate&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;16000&lt;/span&gt;))&lt;/div&gt;&lt;br /&gt;&lt;div&gt;response &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; audio_inference(audio_path, &lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;prompt&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;prompt, &lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;sys_prompt&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;You are a vocal sound classification model.&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;🌟 Model Response:&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;, response[&lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;])&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/1488056837344704533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/1488056837344704533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/1488056837344704533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/1488056837344704533'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/03/qwen25-omni-7b-run-easily-locally-or-in.html' title='Qwen2.5-Omni 7B - Run Easily Locally or in Google Colab'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/wcTDPduyUOo/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-908184475281882077</id><published>2025-03-22T18:36:00.000-07:00</published><updated>2025-03-22T18:36:35.125-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="kdtalker"/><title type='text'>Bring Photos to LIFE! 🗣️ Transform Single Image &amp; Audio to Talking AI Avatar (KDTalker)</title><content type='html'>&lt;p&gt;&amp;nbsp;🔥 &quot;Learn to quickly install KDTalker locally and easily turn any image &amp;amp; audio into a realistic talking AI video!&quot;&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;372&quot; src=&quot;https://www.youtube.com/embed/f5pgomKPHVg&quot; width=&quot;447&quot; youtube-src-id=&quot;f5pgomKPHVg&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;conda create -n KDTalker python=3.9 -y &amp;amp;&amp;amp; conda activate KDTalker&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;git clone https://huggingface.co/ChaolongYang/KDTalker &amp;amp;&amp;amp; cd KDTalker&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;pip install -r requirements.txt&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;pip install huggingface_hub&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;huggingface-cli login&amp;nbsp; &amp;lt;Grab your Free Read token from huggingface.co&amp;gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;huggingface-cli download ChaolongYang/KDTalker pretrained_weights&amp;nbsp;&lt;/p&gt;&lt;p&gt;--local-dir pretrained_weights --local-dir-use-symlinks False&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;python inference.py \&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; -source_image /home/Ubuntu/images/fahdimages/fahdhd.png \&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; -driven_audio /home/Ubuntu/audio/chinese.wav \&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; -output ./results/output.mp4&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/908184475281882077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/908184475281882077' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/908184475281882077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/908184475281882077'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/03/bring-photos-to-life-transform-single.html' title='Bring Photos to LIFE! 🗣️ Transform Single Image &amp; Audio to Talking AI Avatar (KDTalker)'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/f5pgomKPHVg/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-7447062466336096749</id><published>2025-03-18T13:31:00.000-07:00</published><updated>2025-03-18T13:31:54.265-07:00</updated><title type='text'>Mistral Small 3.1 24B Instruct - Install Locally and Thorough Testing</title><content type='html'>&lt;p&gt;This video locally installs Mistral-Small-3.1-24B-Instruct-2503 and checks for various vision tasks along with others.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;382&quot; src=&quot;https://www.youtube.com/embed/Yvg0iNujyi0&quot; width=&quot;460&quot; youtube-src-id=&quot;Yvg0iNujyi0&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;VLLM Code:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;vllm serve mistralai/Mistral-Small-3.1-24B-Instruct-2503 --tokenizer_mode mistral --config_format mistral --load_format mistral --tool-call-parser mistral --enable-auto-tool-choice --limit_mm_per_prompt &#39;image=10&#39; --tensor-parallel-size 1&lt;/p&gt;&lt;p&gt;&lt;b&gt;Inference Code:&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; requests&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; json&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; base64&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt; PIL &lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; Image&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; io&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;# Endpoint&lt;/span&gt;&lt;/div&gt;&lt;div&gt;url &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;http://localhost:8000/v1/chat/completions&quot;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;# Headers (modify token as required)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;headers &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Content-Type&quot;&lt;/span&gt;: &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;application/json&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Authorization&quot;&lt;/span&gt;: &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Bearer token&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;# Your model name (match exact served model)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;model &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;mistralai/Mistral-Small-3.1-24B-Instruct-2503&quot;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;# Minimal simple system prompt (no complicated pre-downloaded prompt)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;SYSTEM_PROMPT &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;You are Mistral Small 3.1, a Large Language Model (LLM) created by Mistral AI, a French startup headquartered in Paris.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;You power an AI assistant called Le Chat.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;Your knowledge base was last updated on 2023-10-01.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;The current date is &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;{today}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;When you&#39;re not sure about some information, you say that you don&#39;t have the information and don&#39;t make up anything.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;If the user&#39;s question is not clear, ambiguous, or does not provide enough context for you to accurately answer the question, you do not try to answer it right away and you rather ask the user to clarify their request (e.g. &quot;What are some good restaurants around me?&quot; =&amp;gt; &quot;Where are you?&quot; or &quot;When is the next flight to Tokyo&quot; =&amp;gt; &quot;Where do you travel from?&quot;).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;You are always very attentive to dates, in particular you try to resolve dates (e.g. &quot;yesterday&quot; is &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;{yesterday}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;) and when asked about information at specific dates, you discard information that is at another date.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;You follow these instructions in all languages, and always respond to the user in the language they use or request.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;Next sections describe the capabilities that you have.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;# WEB BROWSING INSTRUCTIONS&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;You cannot perform any web search or access internet to open URLs, links etc. If it seems like the user is expecting you to do so, you clarify the situation and ask the user to copy paste the text directly in the chat.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;# MULTI-MODAL INSTRUCTIONS&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;You have the ability to read images, but you cannot generate images. You also cannot transcribe audio files or videos.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;prompt&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;explain this chart and which product is better?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;# Load and encode image correctly&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;with&lt;/span&gt; Image.open(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;/home/Ubuntu/images/moondream/chart.png&#39;&lt;/span&gt;).convert(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;RGB&#39;&lt;/span&gt;) &lt;span style=&quot;color: #c586c0;&quot;&gt;as&lt;/span&gt; img:&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; buffered &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; io.BytesIO()&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; img.save(buffered, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;PNG&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; img_base64 &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; base64.b64encode(buffered.getvalue()).decode(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;utf-8&#39;&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;image_data_uri &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;data:image/png;base64,&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;{&lt;/span&gt;img_base64&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;# Simple user message aligned clearly to your described intention&lt;/span&gt;&lt;/div&gt;&lt;div&gt;messages &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; [&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;role&quot;&lt;/span&gt;: &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;system&quot;&lt;/span&gt;, &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;content&quot;&lt;/span&gt;: SYSTEM_PROMPT},&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;role&quot;&lt;/span&gt;: &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;user&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;content&quot;&lt;/span&gt;: [&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;text&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;text&quot;&lt;/span&gt;: prompt,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;image_url&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;image_url&quot;&lt;/span&gt;: {&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;url&quot;&lt;/span&gt;: image_data_uri}&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; },&lt;/div&gt;&lt;div&gt;]&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;# data payload correctly specified&lt;/span&gt;&lt;/div&gt;&lt;div&gt;data &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;model&quot;&lt;/span&gt;: model,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;messages&quot;&lt;/span&gt;: messages,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;temperature&quot;&lt;/span&gt;: &lt;span style=&quot;color: #b5cea8;&quot;&gt;0.15&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;# Post request&lt;/span&gt;&lt;/div&gt;&lt;div&gt;response &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; requests.post(url, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;headers&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;headers, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;json.dumps(data))&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;# Read response&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt; response.status_code &lt;span style=&quot;color: #d4d4d4;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;200&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; result &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; response.json()&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; reply_message &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; result[&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;choices&quot;&lt;/span&gt;][&lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;message&quot;&lt;/span&gt;][&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;content&quot;&lt;/span&gt;]&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;print&lt;/span&gt;(reply_message)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;else&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;print&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Request failed: &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;{&lt;/span&gt;response.status_code&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;{&lt;/span&gt;response.text&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&lt;/span&gt;)&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/7447062466336096749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/7447062466336096749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/7447062466336096749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/7447062466336096749'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/03/mistral-small-31-24b-instruct-install.html' title='Mistral Small 3.1 24B Instruct - Install Locally and Thorough Testing'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/Yvg0iNujyi0/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-2804901394883766254</id><published>2025-03-06T17:13:00.000-08:00</published><updated>2025-03-06T17:15:10.739-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hunyuan"/><category scheme="http://www.blogger.com/atom/ns#" term="HunyuanVideo"/><category scheme="http://www.blogger.com/atom/ns#" term="i2v"/><title type='text'>Install HunyuanVideo Image to Video Locally - Create Free Private AI Videos</title><content type='html'>&lt;p&gt;&amp;nbsp;This video locally installs HunyuanVideo-I2V, which is a new image-to-video generation model.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;397&quot; src=&quot;https://www.youtube.com/embed/XO75_qOdGJg&quot; width=&quot;478&quot; youtube-src-id=&quot;XO75_qOdGJg&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Models:&lt;/b&gt;&lt;/p&gt;&lt;ul style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border-color: rgb(var(--gray-200)); border-style: solid; border-width: 0px; box-sizing: border-box; color: #9fa1a5; font-family: __Inter_e5ab12, __Inter_Fallback_e5ab12; font-size: 16px; list-style: none; margin: 1.25em 0px; padding-inline-start: 1.625em; padding: 0px;&quot;&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border-color: rgb(var(--gray-200)); border-style: solid; border-width: 0px; box-sizing: border-box; margin-bottom: 0.5em; margin-top: 0.5em; padding-inline-start: 0.375em; padding-left: 2em !important; position: relative;&quot;&gt;&lt;a href=&quot;https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged/resolve/main/split_files/clip_vision/llava_llama3_vision.safetensors?download=true&quot; rel=&quot;noreferrer&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border-bottom: 1px solid rgb(var(--primary-light)); border-left-style: solid; border-left-width: 0px; border-right-style: solid; border-right-width: 0px; border-top-style: solid; border-top-width: 0px; box-sizing: border-box; font-weight: 600; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;llava_llama3_vision.safetensors&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border-color: rgb(var(--gray-200)); border-style: solid; border-width: 0px; box-sizing: border-box; margin-bottom: 0.5em; margin-top: 0.5em; padding-inline-start: 0.375em; padding-left: 2em !important; position: relative;&quot;&gt;&lt;a href=&quot;https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged/resolve/main/split_files/text_encoders/clip_l.safetensors?download=true&quot; rel=&quot;noreferrer&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border-bottom: 1px solid rgb(var(--primary-light)); border-left-style: solid; border-left-width: 0px; border-right-style: solid; border-right-width: 0px; border-top-style: solid; border-top-width: 0px; box-sizing: border-box; font-weight: 600; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;clip_l.safetensors&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border-color: rgb(var(--gray-200)); border-style: solid; border-width: 0px; box-sizing: border-box; margin-bottom: 0.5em; margin-top: 0.5em; padding-inline-start: 0.375em; padding-left: 2em !important; position: relative;&quot;&gt;&lt;a href=&quot;https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged/resolve/main/split_files/text_encoders/llava_llama3_fp16.safetensors?download=true&quot; rel=&quot;noreferrer&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border-bottom: 1px solid rgb(var(--primary-light)); border-left-style: solid; border-left-width: 0px; border-right-style: solid; border-right-width: 0px; border-top-style: solid; border-top-width: 0px; box-sizing: border-box; font-weight: 600; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;llava_llama3_fp16.safetensors&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border-color: rgb(var(--gray-200)); border-style: solid; border-width: 0px; box-sizing: border-box; margin-bottom: 0.5em; margin-top: 0.5em; padding-inline-start: 0.375em; padding-left: 2em !important; position: relative;&quot;&gt;&lt;a href=&quot;https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged/resolve/main/split_files/text_encoders/llava_llama3_fp8_scaled.safetensors?download=true&quot; rel=&quot;noreferrer&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border-bottom: 1px solid rgb(var(--primary-light)); border-left-style: solid; border-left-width: 0px; border-right-style: solid; border-right-width: 0px; border-top-style: solid; border-top-width: 0px; box-sizing: border-box; font-weight: 600; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;llava_llama3_fp8_scaled.safetensors&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border-color: rgb(var(--gray-200)); border-style: solid; border-width: 0px; box-sizing: border-box; margin-bottom: 0.5em; margin-top: 0.5em; padding-inline-start: 0.375em; padding-left: 2em !important; position: relative;&quot;&gt;&lt;a href=&quot;https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged/resolve/main/split_files/vae/hunyuan_video_vae_bf16.safetensors?download=true&quot; rel=&quot;noreferrer&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border-bottom: 1px solid rgb(var(--primary-light)); border-left-style: solid; border-left-width: 0px; border-right-style: solid; border-right-width: 0px; border-top-style: solid; border-top-width: 0px; box-sizing: border-box; font-weight: 600; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;hunyuan_video_vae_bf16.safetensors&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border-color: rgb(var(--gray-200)); border-style: solid; border-width: 0px; box-sizing: border-box; margin-bottom: 0.5em; margin-top: 0.5em; padding-inline-start: 0.375em; padding-left: 2em !important; position: relative;&quot;&gt;&lt;a href=&quot;https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged/resolve/main/split_files/diffusion_models/hunyuan_video_image_to_video_720p_bf16.safetensors?download=true&quot; rel=&quot;noreferrer&quot; style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; border-bottom: 1px solid rgb(var(--primary-light)); border-left-style: solid; border-left-width: 0px; border-right-style: solid; border-right-width: 0px; border-top-style: solid; border-top-width: 0px; box-sizing: border-box; font-weight: 600; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;hunyuan_video_image_to_video_720p_bf16.safetensors&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;b&gt;ComfyUI Workflow:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/fahdmirza/comfyuiworkflows&quot;&gt;fahdmirza/comfyuiworkflows: Free ComfyUI Workflows&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/2804901394883766254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/2804901394883766254' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/2804901394883766254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/2804901394883766254'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/03/install-hunyuanvideo-image-to-video.html' title='Install HunyuanVideo Image to Video Locally - Create Free Private AI Videos'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/XO75_qOdGJg/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-636782852765744792</id><published>2025-02-06T20:19:00.000-08:00</published><updated>2025-02-06T20:19:24.841-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ai webscraping"/><category scheme="http://www.blogger.com/atom/ns#" term="crawl4ai"/><category scheme="http://www.blogger.com/atom/ns#" term="deepseek"/><category scheme="http://www.blogger.com/atom/ns#" term="deepseek r1"/><category scheme="http://www.blogger.com/atom/ns#" term="ollama"/><title type='text'>AI Web Scraping for Free with DeepSeek R1 Locally with Crawl4AI and Ollama</title><content type='html'>&lt;p&gt;&amp;nbsp;This video shows how to do AI web-scraping with DeepSeek R1 locally with Ollama and Crawl4AI easily.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;379&quot; src=&quot;https://www.youtube.com/embed/xr1iFonB5VI&quot; width=&quot;456&quot; youtube-src-id=&quot;xr1iFonB5VI&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Code:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/fahdmirza/deepseekwebscraper/tree/main&quot;&gt;deepseekwebscraper/ at main · fahdmirza/deepseekwebscraper&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/636782852765744792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/636782852765744792' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/636782852765744792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/636782852765744792'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/02/ai-web-scraping-for-free-with-deepseek.html' title='AI Web Scraping for Free with DeepSeek R1 Locally with Crawl4AI and Ollama'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/xr1iFonB5VI/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-1896120491874747160</id><published>2025-02-06T14:25:00.000-08:00</published><updated>2025-02-09T14:28:44.118-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JSON"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle AI"/><title type='text'>Getting Data LLM-Ready with JSON in Oracle Database</title><content type='html'>&lt;p&gt;&amp;nbsp;If you are building an AI-powered application, especially with tools and function calling you know that using JSON could greatly improve the accuracy of your application and the LLM would be able to give more grounded response. That is where this blog post is helping to show you how easy and powerful it is to use JSON with Oracle PL/SQL, which is still very much relevant in today&#39;s AI world.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;p&gt;Oracle Database provides native support for JavaScript Object Notation (JSON) data, allowing you to store, index, and query JSON data using standard SQL and PL/SQL.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Benefits of Using JSON in Oracle Database&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Schemaless development: Quickly react to changing application requirements without needing to change storage schemas.&lt;/li&gt;&lt;li&gt;Flexible data analysis and reporting: Leverage the power of SQL and relational databases for complex data analysis and reporting.&lt;/li&gt;&lt;li&gt;Rock-solid data protection and access control: Ensure data integrity and security with Oracle Database&#39;s robust features.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;JSON data can be stored, indexed, and queried without defining a schema. Oracle Database supports JSON natively, providing features like transactions, indexing, declarative querying, and views. JSON data is stored using standard SQL data types such as VARCHAR2, CLOB, and BLOB. It is recommended to use an is_json check constraint to ensure column values are valid JSON instances.&lt;/p&gt;&lt;p&gt;PL/SQL supports SQL code, including SQL code that accesses JSON data. You can use SQL/JSON functions and conditions as built-in PL/SQL functions.&lt;/p&gt;&lt;p&gt;Additionally, PL/SQL provides object types for JSON, allowing for fine-grained construction and manipulation of in-memory JSON data.&lt;/p&gt;&lt;p&gt;Let&#39;s say we have a JSON object that represents a list of books:&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;declare&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; v_json &amp;nbsp; &amp;nbsp; &amp;nbsp;clob;&lt;/div&gt;&lt;div&gt;&amp;nbsp; v_parsed &amp;nbsp; &amp;nbsp;json_object_t;&lt;/div&gt;&lt;div&gt;&amp;nbsp; v_books &amp;nbsp; &amp;nbsp; json_array_t;&lt;/div&gt;&lt;div&gt;&amp;nbsp; v_book &amp;nbsp; &amp;nbsp; &amp;nbsp;json_object_t;&lt;/div&gt;&lt;div&gt;&amp;nbsp; v_title &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;varchar2&lt;/span&gt;(&lt;span style=&quot;color: #b5cea8;&quot;&gt;100&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; v_author &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;varchar2&lt;/span&gt;(&lt;span style=&quot;color: #b5cea8;&quot;&gt;100&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; v_price &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;number&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;begin&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #6a9955;&quot;&gt;-- Load JSON Data&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; v_json :&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &quot;books&quot;: [&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;title&quot;: &quot;Book 1&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;author&quot;: &quot;Author 1&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;price&quot;: 10.99&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;title&quot;: &quot;Book 2&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;author&quot;: &quot;Author 2&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;price&quot;: 9.99&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;title&quot;: &quot;Book 3&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;author&quot;: &quot;Author 3&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;price&quot;: 12.99&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; &amp;nbsp; ]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&amp;nbsp; }&#39;&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #6a9955;&quot;&gt;-- Parse JSON&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; v_parsed :&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; json_object_t.parse(v_json);&lt;/div&gt;&lt;div&gt;&amp;nbsp; v_books :&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; v_parsed.get_array(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;books&#39;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #6a9955;&quot;&gt;-- Loop through books&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;for&lt;/span&gt; i &lt;span style=&quot;color: #569cd6;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt; .. v_books.get_size&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;loop&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; v_book :&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; v_books.get_object(i);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; v_title :&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; v_book.get_string(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;title&#39;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; v_author :&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; v_book.get_string(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;author&#39;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; v_price :&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; v_book.get_number(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;price&#39;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #6a9955;&quot;&gt;-- Output book details&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; dbms_output.put_line(v_title &lt;span style=&quot;color: #d4d4d4;&quot;&gt;||&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39; by &#39;&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;||&lt;/span&gt; v_author &lt;span style=&quot;color: #d4d4d4;&quot;&gt;||&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;, Price: &#39;&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;||&lt;/span&gt; v_price);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;loop&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;end&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;/&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;The output of this script would be:&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;Book &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;by&lt;/span&gt; Author &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;, Price: &lt;span style=&quot;color: #b5cea8;&quot;&gt;10&lt;/span&gt;.&lt;span style=&quot;color: #b5cea8;&quot;&gt;99&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Book &lt;span style=&quot;color: #b5cea8;&quot;&gt;2&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;by&lt;/span&gt; Author &lt;span style=&quot;color: #b5cea8;&quot;&gt;2&lt;/span&gt;, Price: &lt;span style=&quot;color: #b5cea8;&quot;&gt;9&lt;/span&gt;.&lt;span style=&quot;color: #b5cea8;&quot;&gt;99&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Book &lt;span style=&quot;color: #b5cea8;&quot;&gt;3&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;by&lt;/span&gt; Author &lt;span style=&quot;color: #b5cea8;&quot;&gt;3&lt;/span&gt;, Price: &lt;span style=&quot;color: #b5cea8;&quot;&gt;12&lt;/span&gt;.&lt;span style=&quot;color: #b5cea8;&quot;&gt;99&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;By leveraging Oracle Database&#39;s native support for JSON data, you can efficiently store, query, and analyze JSON data using standard SQL and PL/SQL.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/1896120491874747160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/1896120491874747160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/1896120491874747160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/1896120491874747160'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/02/getting-data-llm-ready-with-json-in.html' title='Getting Data LLM-Ready with JSON in Oracle Database'/><author><name>Fahd Mirza Chughtai</name><uri>http://www.blogger.com/profile/03083861859898991937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-2230679168144325136</id><published>2025-02-01T23:03:00.000-08:00</published><updated>2025-02-05T23:04:47.438-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GoldenGate 23ai"/><title type='text'>How-To Speedup Initial Load from Oracle to SQL Server with Oracle GoldenGate 23ai</title><content type='html'>&lt;p&gt;&amp;nbsp;Have you ever stared at your computer screen, watching the hours tick by as you wait for a massive data transfer to complete? If you&#39;re using Oracle GoldenGate to move data from an Oracle database to SQL Server, you might know the feeling all too well—especially when you&#39;re dealing with something like 200 million rows that take way too long. Let’s dive into how Oracle GoldenGate works and some simple tricks to speed up that initial load time.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;b&gt;What is Oracle GoldenGate?&lt;/b&gt;&lt;/p&gt;&lt;p&gt;First things first—what is Oracle GoldenGate? In simple terms, it&#39;s like a super-efficient courier service that gets your data from one place to another. It specializes in real-time data integration and replication, making sure every bit of information moves swiftly and accurately from your Oracle database to whatever destination you&#39;ve chosen, like SQL Server, in this case. It&#39;s especially handy for businesses that need their data synchronized quickly and continuously.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Making the Initial Load Faster&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Now, onto the good part: how can you speed up the initial load that seems to take forever? The good news is that there are several strategies you can use to make the process more efficient.&lt;/p&gt;&lt;p&gt;Using the BATCHSQL parameter is one approach. This allows you to bundle multiple SQL insert statements together, reducing the overall time spent on these operations. Creating a unique index on your target SQL Server for inserts is another useful tip. This helps your database manage the incoming data more efficiently, cutting down on the time it takes to sort and place the records.&lt;/p&gt;&lt;p&gt;Splitting your data into smaller batches is also a great way to speed things up. Instead of overwhelming your system with 200 million rows all at once, use the Range function or Column Filters to divide the data into more manageable chunks. This approach is especially useful for large tables, as it allows you to tackle the data in sections rather than trying to handle it all at once.&lt;/p&gt;&lt;p&gt;Finally, if you&#39;re working with multiple database instances that are all on the same version, consider creating multiple extracts that can connect to these different instances. This allows you to distribute the workload across various sources, which can significantly speed up the entire process.&lt;/p&gt;&lt;p&gt;By implementing these strategies, you can make your initial load process faster, smoother, and less stressful. Whether you&#39;re dealing with 200 million rows or even more, these tips can help you get the job done more efficiently.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/2230679168144325136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/2230679168144325136' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/2230679168144325136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/2230679168144325136'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/02/how-to-speedup-initial-load-from-oracle.html' title='How-To Speedup Initial Load from Oracle to SQL Server with Oracle GoldenGate 23ai'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-5910459348361211387</id><published>2025-01-30T22:51:00.000-08:00</published><updated>2025-02-05T22:56:34.797-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GoldenGate 23ai"/><title type='text'>How-To Fix Poco::IOException Error During Goldengate 23ai Upgrade</title><content type='html'>&lt;p&gt;&amp;nbsp;I recently upgraded Oracle GoldenGate 23ai. In this post, I&#39;ll share my experience and provide a step-by-step guide on how to upgrade Oracle GoldenGate 23ai using the GUI and especially a weird error which I received during this upgrade which is as follows:&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;b&gt;Error:&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;Operating &lt;span style=&quot;color: #569cd6;&quot;&gt;system&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;character&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;set&lt;/span&gt; identified &lt;span style=&quot;color: #569cd6;&quot;&gt;as&lt;/span&gt; UTF&lt;span style=&quot;color: #d4d4d4;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;8&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;terminate called &lt;span style=&quot;color: #569cd6;&quot;&gt;after&lt;/span&gt; throwing an instance of &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;Poco::IOException&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;what(): I&lt;span style=&quot;color: #d4d4d4;&quot;&gt;/&lt;/span&gt;O error&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;If you want TLDR; then I had to apply &lt;b&gt;patch 27788241&lt;/b&gt; to get this resolved. For details, keep reading on.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To start the upgrade, I downloaded the latest Oracle GoldenGate 23ai software from the Oracle Technology Network or eDelivery. Then, I moved the software to a staging folder and unzipped it.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;For Linux users, the commands are:&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;$ mv &lt;span style=&quot;color: #d4d4d4;&quot;&gt;/&lt;/span&gt;home&lt;span style=&quot;color: #d4d4d4;&quot;&gt;/&lt;/span&gt;user&lt;span style=&quot;color: #d4d4d4;&quot;&gt;/&lt;/span&gt;fbo_ggs_Linux_x64_Oracle_services_shiphome.zip &lt;span style=&quot;color: #d4d4d4;&quot;&gt;/&lt;/span&gt;tmp&lt;/div&gt;&lt;div&gt;$ cd &lt;span style=&quot;color: #d4d4d4;&quot;&gt;/&lt;/span&gt;tmp&lt;/div&gt;&lt;div&gt;$ unzip fbo_ggs_Linux_x64_Oracle_services_shiphome.zip&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Next, I uploaded the Oracle GoldenGate 23ai software to a staging location on the server where the previous release of Oracle GoldenGate existed.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Upgrading the Service Manager&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;After installing the latest Oracle GoldenGate 23ai version, I upgraded the Service Manager. I logged into the Service Manager using the URL: https://hostname:servicemanager_port.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;From the Service Manager Overview page, I selected the ServiceManager link in the Deployments section. Then, I clicked the pencil icon next to the Deployment Detail section to open the dialog box for editing the GoldenGate home path.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I updated the GoldenGate Home path with the full path to the new Oracle GoldenGate 23ai home and clicked Apply. Finally, I restarted the Service Manager using the Action dropdown.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Upgrading the Deployment&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;To upgrade the deployment, I stopped all Extract and Replicat processes. I checked for open transactions and Bounded Recovery.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Then, I updated the deployment with the location of the new Oracle GoldenGate 23ai Home directory. I edited the deployment details and updated the Oracle GoldenGate 23ai Home path.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Resolving the Error&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;During the upgrade, I got this error:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;Operating &lt;span style=&quot;color: #569cd6;&quot;&gt;system&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;character&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;set&lt;/span&gt; identified &lt;span style=&quot;color: #569cd6;&quot;&gt;as&lt;/span&gt; UTF&lt;span style=&quot;color: #d4d4d4;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;8&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;terminate called &lt;span style=&quot;color: #569cd6;&quot;&gt;after&lt;/span&gt; throwing an instance of &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;Poco::IOException&#39;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;what(): I&lt;span style=&quot;color: #d4d4d4;&quot;&gt;/&lt;/span&gt;O error&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;After researching, I found that applying patch 27788241 fixed the issue. I applied the patch, and the upgrade completed successfully.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Hope this helps.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/5910459348361211387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/5910459348361211387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/5910459348361211387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/5910459348361211387'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/01/how-to-fix-pocoioexception-error-during.html' title='How-To Fix Poco::IOException Error During Goldengate 23ai Upgrade'/><author><name>Fahd Mirza Chughtai</name><uri>http://www.blogger.com/profile/03083861859898991937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-1946721903972615287</id><published>2025-01-26T17:16:00.000-08:00</published><updated>2025-01-26T17:16:10.556-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="deepseek"/><category scheme="http://www.blogger.com/atom/ns#" term="deepseek r1"/><title type='text'>DeepSeek R1 Coding Examples - Easy Tutorial for Beginners and Experts</title><content type='html'>&lt;p&gt;&amp;nbsp;This video gives a hands-on tutorial to use DeepSeek R1 model in code for various use-cases.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;382&quot; src=&quot;https://www.youtube.com/embed/WbKa-gxVybA&quot; width=&quot;460&quot; youtube-src-id=&quot;WbKa-gxVybA&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Code:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/fahdmirza/deepseekr1&quot;&gt;fahdmirza/deepseekr1: This repo contains examples of using DeepSeek R1 Reasoner model in Python Code with API&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/1946721903972615287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/1946721903972615287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/1946721903972615287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/1946721903972615287'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/01/deepseek-r1-coding-examples-easy.html' title='DeepSeek R1 Coding Examples - Easy Tutorial for Beginners and Experts'/><author><name>Fahd Mirza Chughtai</name><uri>http://www.blogger.com/profile/03083861859898991937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/WbKa-gxVybA/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-3854725877656697225</id><published>2025-01-21T19:42:00.000-08:00</published><updated>2025-02-02T19:43:44.485-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="oracle scheduler"/><title type='text'>Oracle Scheduler SQL Cheat Sheet</title><content type='html'>&lt;p&gt;&amp;nbsp;Oracle Scheduler is a built-in job scheduler in Oracle Database that enables you to manage and execute various tasks, such as running database program units, external executables, and scripts. It provides a flexible and sophisticated way to schedule jobs based on time, events, or dependencies, allowing you to automate routine tasks and reduce manual intervention.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;p&gt;The Scheduler offers advanced features, including prioritization of jobs based on business requirements, resource allocation, and monitoring of job execution. It also supports execution of jobs in a clustered environment, such as Oracle Real Application Clusters (Oracle RAC). With Oracle Scheduler, you can streamline your database operations, improve reliability, and reduce operating costs.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You can use following SQLs to manage your Scheduler and the jobs:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;Check&lt;/span&gt; Scheduler Job Details &lt;span style=&quot;color: #569cd6;&quot;&gt;in&lt;/span&gt; CDB&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SQL&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;-- View job details in the Container Database (CDB)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SELECT&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; CON_ID, &lt;/div&gt;&lt;div&gt;&amp;nbsp; JOB_NAME, &lt;/div&gt;&lt;div&gt;&amp;nbsp; JOB_TYPE, &lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;ENABLED&lt;/span&gt;, &lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;STATE&lt;/span&gt;, &lt;/div&gt;&lt;div&gt;&amp;nbsp; NEXT_RUN_DATE, &lt;/div&gt;&lt;div&gt;&amp;nbsp; REPEAT_INTERVAL &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;FROM&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; cdb_scheduler_jobs;&lt;/div&gt;&lt;div&gt;Monitor Currently Running Jobs&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SQL&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;-- View currently running jobs&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SELECT&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; job_name, &lt;/div&gt;&lt;div&gt;&amp;nbsp; session_id, &lt;/div&gt;&lt;div&gt;&amp;nbsp; running_instance, &lt;/div&gt;&lt;div&gt;&amp;nbsp; elapsed_time &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;FROM&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; dba_scheduler_running_jobs;&lt;/div&gt;&lt;div&gt;View Job Run Details&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SQL&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;-- View details of job runs&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SELECT&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;*&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;FROM&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; DBA_SCHEDULER_JOB_RUN_DETAILS;&lt;/div&gt;&lt;div&gt;View Job&lt;span style=&quot;color: #d4d4d4;&quot;&gt;-&lt;/span&gt;Related Logs&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SQL&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;-- View logs related to job execution&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SELECT&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;*&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;FROM&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; DBA_SCHEDULER_JOB_LOG;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;Check&lt;/span&gt; All Scheduler Schedules&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SQL&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;-- Set formatting options for output&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SET&lt;/span&gt; PAGESIZE &lt;span style=&quot;color: #b5cea8;&quot;&gt;200&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SET&lt;/span&gt; LINES &lt;span style=&quot;color: #b5cea8;&quot;&gt;299&lt;/span&gt;&lt;/div&gt;&lt;div&gt;COL &lt;span style=&quot;color: #569cd6;&quot;&gt;START_DATE&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;FOR&lt;/span&gt; A45&lt;/div&gt;&lt;div&gt;COL REPEAT_INTERVAL &lt;span style=&quot;color: #569cd6;&quot;&gt;FOR&lt;/span&gt; A45&lt;/div&gt;&lt;div&gt;COL schedule_name &lt;span style=&quot;color: #569cd6;&quot;&gt;FOR&lt;/span&gt; A34&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;-- View all scheduler schedules&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SELECT&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; schedule_name, &lt;/div&gt;&lt;div&gt;&amp;nbsp; schedule_type, &lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;start_date&lt;/span&gt;, &lt;/div&gt;&lt;div&gt;&amp;nbsp; repeat_interval &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;FROM&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; dba_scheduler_schedules;&lt;/div&gt;&lt;div&gt;History of All Scheduler Job Runs&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SQL&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;-- Set formatting options for output&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SET&lt;/span&gt; PAGESIZE &lt;span style=&quot;color: #b5cea8;&quot;&gt;299&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SET&lt;/span&gt; LINES &lt;span style=&quot;color: #b5cea8;&quot;&gt;299&lt;/span&gt;&lt;/div&gt;&lt;div&gt;COL JOB_NAME &lt;span style=&quot;color: #569cd6;&quot;&gt;FOR&lt;/span&gt; A24&lt;/div&gt;&lt;div&gt;COL actual_start_date &lt;span style=&quot;color: #569cd6;&quot;&gt;FOR&lt;/span&gt; A56&lt;/div&gt;&lt;div&gt;COL RUN_DURATION &lt;span style=&quot;color: #569cd6;&quot;&gt;FOR&lt;/span&gt; A34&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;-- View history of all scheduler job runs&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SELECT&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; job_name, &lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;status&lt;/span&gt;, &lt;/div&gt;&lt;div&gt;&amp;nbsp; actual_start_date, &lt;/div&gt;&lt;div&gt;&amp;nbsp; run_duration &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;FROM&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; DBA_SCHEDULER_JOB_RUN_DETAILS &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;ORDER BY&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; ACTUAL_START_DATE &lt;span style=&quot;color: #569cd6;&quot;&gt;DESC&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;Check&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;Log&lt;/span&gt; Information &lt;span style=&quot;color: #569cd6;&quot;&gt;for&lt;/span&gt; All Scheduler Jobs&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SQL&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;-- Set formatting options for output&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SET&lt;/span&gt; PAGESIZE &lt;span style=&quot;color: #b5cea8;&quot;&gt;299&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SET&lt;/span&gt; LINES &lt;span style=&quot;color: #b5cea8;&quot;&gt;299&lt;/span&gt;&lt;/div&gt;&lt;div&gt;COL job_name &lt;span style=&quot;color: #569cd6;&quot;&gt;FOR&lt;/span&gt; A24&lt;/div&gt;&lt;div&gt;COL log_date &lt;span style=&quot;color: #569cd6;&quot;&gt;FOR&lt;/span&gt; A40&lt;/div&gt;&lt;div&gt;COL operation &lt;span style=&quot;color: #569cd6;&quot;&gt;FOR&lt;/span&gt; A19&lt;/div&gt;&lt;div&gt;COL additional_info A79&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;-- View log information for all scheduler jobs&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SELECT&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; job_name, &lt;/div&gt;&lt;div&gt;&amp;nbsp; log_date, &lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;status&lt;/span&gt;, &lt;/div&gt;&lt;div&gt;&amp;nbsp; OPERATION, &lt;/div&gt;&lt;div&gt;&amp;nbsp; ADDITIONAL_INFO &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;FROM&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; dba_scheduler_job_log &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;ORDER BY&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; log_date &lt;span style=&quot;color: #569cd6;&quot;&gt;DESC&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;Check&lt;/span&gt; All Scheduler &lt;span style=&quot;color: #569cd6;&quot;&gt;Windows&lt;/span&gt; Details&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SQL&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;-- Set formatting options for output&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SET&lt;/span&gt; PAGESIZE &lt;span style=&quot;color: #b5cea8;&quot;&gt;300&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SET&lt;/span&gt; LINESIZE &lt;span style=&quot;color: #b5cea8;&quot;&gt;200&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;-- View all scheduler windows details&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;SELECT&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;*&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;FROM&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&amp;nbsp; dba_scheduler_windows;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/3854725877656697225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/3854725877656697225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/3854725877656697225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/3854725877656697225'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/01/oracle-scheduler-sql-cheat-sheet.html' title='Oracle Scheduler SQL Cheat Sheet'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-5549858340544425182</id><published>2025-01-14T22:11:00.000-08:00</published><updated>2025-01-24T22:12:25.833-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle select ai"/><title type='text'>SOLVED - ORA-20000: ORA-24247: Network access denied by access control list (ACL) with Select AI</title><content type='html'>&lt;p&gt;&amp;nbsp;I have been experimenting with Oracle Select AI for couple of months now and it has become one of my favorite tool. The other day, I encountered an error while playing with it and it took me sometime to find a fix, so thought of sharing it with you guys.&amp;nbsp;&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;p&gt;If you don&#39;t know what Oracle Select AI is, here is a quick simple intro:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Oracle Select AI is a tool that lets you interact with your database using everyday language instead of complicated SQL code. It uses artificial intelligence (AI) to understand what you&#39;re asking and generate the right SQL queries for you. This makes it easier for everyone, regardless of their technical expertise, to get insights from their data and develop AI-based applications.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Now we know what Oracle Select AI is, lets have a look at error:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I was trying to integrate Select AI with Oracle APEX. Oracle Application Express (Oracle APEX) is a low-code application development platform that enables users to build scalable, secure enterprise applications. It is a web-based integrated development environment (IDE) that runs as part of the Oracle Database.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;But when I was trying to configure profile with OpenAI&#39;s model like following:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; DBMS_CLOUD_AI.CREATE_PROFILE(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; profile_name =&amp;gt; &#39;OPENAI_ORACLE&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; attributes =&amp;gt; &#39;{ &quot;provider&quot;: &quot;openai&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;credential_name&quot;: &quot;OPENAI_CRED&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;object_list&quot;: [{&quot;owner&quot;: &quot;SCOTT&quot;, &quot;name&quot;: &quot;MYTABLE&quot;}]&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; description =&amp;gt; &#39;AI profile to use OpenAI with Oracle APEX&#39;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; );&lt;/p&gt;&lt;p&gt;END;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I was getting following error:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;ORA-20000: ORA-24247: Network access denied by access control list (ACL)&lt;/p&gt;&lt;p&gt;ORA-06512: en &quot;C##CLOUD$SERVICE.DBMS_CLOUD$PDBCS_240705_0&quot;, línea 2064&lt;/p&gt;&lt;p&gt;ORA-06512: en &quot;C##CLOUD$SERVICE.DBMS_CLOUD_AI&quot;, línea 5674&lt;/p&gt;&lt;p&gt;ORA-06512: en línea 2 Error at Line: 7 Column: 0&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;After much ado, it turned out that I had missed following step to grant network access:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HOST =&amp;gt; &#39;api.openai.com&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ACE =&amp;gt; XS$ACE_TYPE(PRIVILEGE_LIST =&amp;gt; XS$NAME_LIST(&#39;http&#39;),&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PRINCIPAL_NAME =&amp;gt; &#39;SCOTT&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PRINCIPAL_TYPE =&amp;gt; XS_ACL.PTYPE_DB)&lt;/p&gt;&lt;p&gt;);&lt;/p&gt;&lt;p&gt;END;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;As soon as I run above network ACL command, it worked like a charm.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Hope that helps.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/5549858340544425182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/5549858340544425182' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/5549858340544425182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/5549858340544425182'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/01/solved-ora-20000-ora-24247-network.html' title='SOLVED - ORA-20000: ORA-24247: Network access denied by access control list (ACL) with Select AI'/><author><name>Fahd Mirza Chughtai</name><uri>http://www.blogger.com/profile/03083861859898991937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-8049484714290469258</id><published>2025-01-13T15:48:00.000-08:00</published><updated>2025-01-13T15:48:58.365-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="nvidia sana"/><category scheme="http://www.blogger.com/atom/ns#" term="sana"/><title type='text'>NVIDIA SANA Model Local Installation with GUI - Step-by-Step Tutorial</title><content type='html'>&lt;p&gt;&amp;nbsp;This video locally installs NVIDIA SANA which is a text-to-image framework that can efficiently generate images up to 4096 × 4096 resolution.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;364&quot; src=&quot;https://www.youtube.com/embed/wjW8z4Ys7yQ&quot; width=&quot;438&quot; youtube-src-id=&quot;wjW8z4Ys7yQ&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;git clone https://github.com/NVlabs/Sana.git &amp;amp;&amp;amp; cd Sana&lt;/div&gt;&lt;br /&gt;&lt;div&gt;./environment_setup.sh sana&lt;/div&gt;&lt;br /&gt;&lt;div&gt;pip install huggingface_hub&lt;/div&gt;&lt;br /&gt;&lt;div&gt;huggingface-cli login &amp;nbsp;&lt;span style=&quot;color: grey;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;Get&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;read&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;token&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;huggingface.co&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;also&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;accept&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;access&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;to&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;google&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;gemma&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;model on huggingface&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6; font-weight: bold;&quot;&gt;# official online demo&lt;/span&gt;&lt;/div&gt;&lt;div&gt;DEMO_PORT=15432 \&lt;/div&gt;&lt;div&gt;python3 app/app_sana.py \&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; --share \&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; --config=configs/sana_config/1024ms/Sana_1600M_img1024.yaml \&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; --model_path=hf://Efficient-Large-Model/Sana_1600M_1024px/checkpoints/Sana_1600M_1024px.pth \&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; --image_size=1024&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;/div&gt;&lt;div&gt;Access demo at http://localhost:15432&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/8049484714290469258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/8049484714290469258' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/8049484714290469258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/8049484714290469258'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/01/nvidia-sana-model-local-installation.html' title='NVIDIA SANA Model Local Installation with GUI - Step-by-Step Tutorial'/><author><name>Fahd Mirza Chughtai</name><uri>http://www.blogger.com/profile/03083861859898991937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/wjW8z4Ys7yQ/default.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-6255126804830785699</id><published>2025-01-07T21:54:00.000-08:00</published><updated>2025-01-24T21:55:36.021-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle select ai"/><title type='text'>How to Use OpenAI models with Oracle Select AI</title><content type='html'>&lt;p&gt;&amp;nbsp;If you want to use OpenAI models with Oracle databases then Oracle Select AI makes it a breeze to do so. Provided you already have an Oracle autonomous database in OCI, you can use following steps to use OpenAI&#39;s model to use natural language to query you database with LLMs from&amp;nbsp; OpenAI.&amp;nbsp;&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;p&gt;Oracle Autonomous Database Select AI is a powerful tool that enables you to leverage AI capabilities directly within your database environment, and OpenAI is a leading AI model provider. Also, as OpenAI is a paid option, so you would need to grab your OpenAI&#39;s API key from platform.openai.com. By default, Oracle Select AI uses gpt-3.5-turbo (default) from OpenAI but you can select any model from below list:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;gpt-3.5-turbo (default)&lt;/li&gt;&lt;li&gt;gpt-4o&lt;/li&gt;&lt;li&gt;gpt-4o-mini&lt;/li&gt;&lt;li&gt;gpt-4&lt;/li&gt;&lt;li&gt;gpt-4-0613&lt;/li&gt;&lt;li&gt;gpt-4-32k&lt;/li&gt;&lt;li&gt;gpt-4-32k-0613&lt;/li&gt;&lt;li&gt;gpt-3.5-turbo-0613&lt;/li&gt;&lt;li&gt;gpt-3.5-turbo-16k&lt;/li&gt;&lt;li&gt;gpt-3.5-turbo-16k-0613&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Lets first create a user:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;--&amp;nbsp;&lt;/p&gt;&lt;p&gt;CREATE USER SCOTT IDENTIFIED BY &quot;SelectAI25#TEST&quot;;&lt;/p&gt;&lt;p&gt;GRANT RESOURCE TO SCOTT;&lt;/p&gt;&lt;p&gt;GRANT CREATE SESSION TO SCOTT;&lt;/p&gt;&lt;p&gt;GRANT CREATE VIEW TO SCOTT;&lt;/p&gt;&lt;p&gt;GRANT CREATE TABLE TO SCOTT;&lt;/p&gt;&lt;p&gt;GRANT CONNECT TO SCOTT;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;--Grants EXECUTE privilege to SCOTT&lt;/b&gt;&lt;/p&gt;&lt;p&gt;--&lt;/p&gt;&lt;p&gt;SQL&amp;gt; grant execute on DBMS_CLOUD_AI to SCOTT;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;-- Grant Network ACL for OpenAI endpoint&lt;/b&gt;&lt;/p&gt;&lt;p&gt;--&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; BEGIN&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;host =&amp;gt; &#39;api.openai.com&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ace&amp;nbsp; =&amp;gt; xs$ace_type(privilege_list =&amp;gt; xs$name_list(&#39;http&#39;),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;principal_name =&amp;gt; &#39;SCOTT&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;principal_type =&amp;gt; xs_acl.ptype_db)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; END;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; /&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;--&lt;/p&gt;&lt;p&gt;&lt;b&gt;-- Create Credential for AI provider&lt;/b&gt;&lt;/p&gt;&lt;p&gt;--&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;EXEC&lt;/p&gt;&lt;p&gt;DBMS_CLOUD.CREATE_CREDENTIAL(&lt;/p&gt;&lt;p&gt;CREDENTIAL_NAME&amp;nbsp; &amp;nbsp;=&amp;gt; &#39;OPENAI_CRED&#39;,&amp;nbsp;&lt;/p&gt;&lt;p&gt;username&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt;&amp;nbsp; &#39;OPENAI&#39;,&amp;nbsp;&lt;/p&gt;&lt;p&gt;password&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt;&amp;nbsp; &#39;&amp;lt;OPENAI_API_KEY&amp;gt;&#39;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;--&lt;/p&gt;&lt;p&gt;&lt;b&gt;-- Create AI profile&lt;/b&gt;&lt;/p&gt;&lt;p&gt;--&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; DBMS_CLOUD_AI.CREATE_PROFILE(&lt;/p&gt;&lt;p&gt;&amp;nbsp; profile_name&amp;nbsp; &amp;nbsp;=&amp;gt; &#39;OPENAI&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; attributes&amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&#39;{&quot;provider&quot;: &quot;openai&quot;,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;credential_name&quot;: &quot;OPENAI_CRED&quot;,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;object_list&quot;: [{&quot;owner&quot;: &quot;SCOTT&quot;, &quot;name&quot;: &quot;MYTABLE&quot;},&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;conversation&quot;: &quot;true&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&#39;);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;END;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;/&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;--&lt;/p&gt;&lt;p&gt;&lt;b&gt;-- Enable AI profile in current session&lt;/b&gt;&lt;/p&gt;&lt;p&gt;--&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; EXEC DBMS_CLOUD_AI.SET_PROFILE(&#39;OPENAI&#39;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;--&lt;/p&gt;&lt;p&gt;&lt;b&gt;-- Use Select AI&lt;/b&gt;&lt;/p&gt;&lt;p&gt;--&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; select ai how many rows exist in table;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; select ai how many users in Jakarta are jobless;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-- You can also show the actual SQL with the result:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; select ai showsql how many users in Jakarta are jobless;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/6255126804830785699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/6255126804830785699' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/6255126804830785699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/6255126804830785699'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/01/how-to-use-openai-models-with-oracle.html' title='How to Use OpenAI models with Oracle Select AI'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-4363672302711202129</id><published>2025-01-06T15:59:00.000-08:00</published><updated>2025-01-06T15:59:10.721-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ai lip sync"/><category scheme="http://www.blogger.com/atom/ns#" term="latentsync"/><category scheme="http://www.blogger.com/atom/ns#" term="lip sync video"/><category scheme="http://www.blogger.com/atom/ns#" term="lip sync with ai"/><title type='text'>How-To Create Lip Sync Video with AI - Change Any Video or Audio Locally and Free</title><content type='html'>&lt;p&gt;This video shows how to locally install Latent Sync AI model to lip sync any video and audio for free and in private.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;379&quot; src=&quot;https://www.youtube.com/embed/WTeb2tpFpjw&quot; width=&quot;456&quot; youtube-src-id=&quot;WTeb2tpFpjw&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Code:&lt;/p&gt;&lt;p&gt;git clone https://github.com/bytedance/LatentSync.git &amp;amp;&amp;amp; cd LatentSync&lt;/p&gt;&lt;p&gt;source setup_env.sh&lt;/p&gt;&lt;p&gt;./inference.sh&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/4363672302711202129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/4363672302711202129' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/4363672302711202129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/4363672302711202129'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/01/how-to-create-lip-sync-video-with-ai.html' title='How-To Create Lip Sync Video with AI - Change Any Video or Audio Locally and Free'/><author><name>Fahd Mirza Chughtai</name><uri>http://www.blogger.com/profile/03083861859898991937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/WTeb2tpFpjw/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-2160409697960700987</id><published>2025-01-03T23:24:00.000-08:00</published><updated>2025-01-03T23:24:01.698-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="nv ingest"/><category scheme="http://www.blogger.com/atom/ns#" term="NV-INGEST"/><category scheme="http://www.blogger.com/atom/ns#" term="nvidia"/><title type='text'>Install NVIDIA Ingest Locally and Use it with Thousands of Documents</title><content type='html'>&lt;p&gt;&amp;nbsp;This video shares step-by-step instructions to install NVIDIA Ingest locally and use it with PDFs, Word, and PowerPoint.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;401&quot; src=&quot;https://www.youtube.com/embed/vljS8lG5Jt8&quot; width=&quot;482&quot; youtube-src-id=&quot;vljS8lG5Jt8&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Pre-requisites:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6; font-weight: bold;&quot;&gt;===============&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;-- Install docker&lt;/div&gt;&lt;div&gt;-- Get NGC api key from https://ngc.nvidia.com/&lt;/div&gt;&lt;div&gt;-- Get Early Access from https://developer.nvidia.com/nemo-microservices-early-access/join&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Phase 1= Configure NV-INGEST Server:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6; font-weight: bold;&quot;&gt;====================================&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Step 1:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;git clone https://github.com/nvidia/nv-ingest &amp;amp;&amp;amp; cd nv-ingest&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Step 2:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;docker login nvcr.io&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Username: $oauthtoken&lt;/div&gt;&lt;div&gt;Password: &lt;span style=&quot;color: grey;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;Your&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;NGC&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;API&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;Key&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Step 3:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Make sure NVIDIA is set as your default container runtime before running the docker compose command:&lt;/div&gt;&lt;div&gt;sudo nvidia-ctk runtime configure --runtime=docker --set-as-default&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Step 4:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;docker compose up&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Phase 2= Configure NV-INGEST client:&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6; font-weight: bold;&quot;&gt;====================================&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Step 1:&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;conda create --name nv-ingest-dev --file ./conda/environments/nv_ingest_environment.yml&lt;/div&gt;&lt;div&gt;conda activate nv-ingest-dev&lt;/div&gt;&lt;br /&gt;&lt;div&gt;cd client&lt;/div&gt;&lt;div&gt;pip install .&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Step 2:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;nv-ingest-cli \&lt;/div&gt;&lt;div&gt;&amp;nbsp; --doc ./data/multimodal_test.pdf \&lt;/div&gt;&lt;div&gt;&amp;nbsp; --output_directory ./processed_docs \&lt;/div&gt;&lt;div&gt;&amp;nbsp; --task=&#39;extract:{&quot;document_type&quot;: &quot;pdf&quot;, &quot;extract_method&quot;: &quot;pdfium&quot;, &quot;extract_tables&quot;: &quot;true&quot;, &quot;extract_images&quot;: &quot;true&quot;}&#39; \&lt;/div&gt;&lt;div&gt;&amp;nbsp; --client_host=localhost \&lt;/div&gt;&lt;div&gt;&amp;nbsp; --client_port=7670&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &lt;/div&gt;&lt;div&gt;Where to find output?&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6; font-weight: bold;&quot;&gt;======================&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;After the ingestion steps above have completed, you should be able to find text and image subfolders inside your processed docs folder. Each will contain JSON formatted extracted content and metadata.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; ls -R processed_docs&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/2160409697960700987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/2160409697960700987' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/2160409697960700987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/2160409697960700987'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2025/01/install-nvidia-ingest-locally-and-use.html' title='Install NVIDIA Ingest Locally and Use it with Thousands of Documents'/><author><name>Fahd Mirza Chughtai</name><uri>http://www.blogger.com/profile/03083861859898991937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/vljS8lG5Jt8/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-3101341896412031720</id><published>2024-12-31T21:36:00.000-08:00</published><updated>2025-01-24T21:39:48.363-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle select ai"/><category scheme="http://www.blogger.com/atom/ns#" term="selectai"/><title type='text'>Oracle Select AI and DBMS_CLOUD_AI in Simple Words</title><content type='html'>&lt;p&gt;Oracle Select AI enables you to elevate your productivity and develop innovative AI-based applications by interacting with your database and Large Language Models (LLMs) using natural language through SQL.&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;Select AI leverages generative AI to automate and simplify various tasks, including:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Generating, running, and explaining SQL queries from natural language prompts&lt;/li&gt;&lt;li&gt;Retrieval augmented generation using vector stores&lt;/li&gt;&lt;li&gt;Synthetic data generation&lt;/li&gt;&lt;li&gt;Conversing with LLMs&lt;/li&gt;&lt;li&gt;Seamless Natural Language Interaction&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;With Select AI, Autonomous Database effortlessly converts natural language into SQL. This enables you to interact with your data using natural language prompts instead of SQL code.&lt;/p&gt;&lt;p&gt;Select AI serves as a productivity tool for both expert and non-expert SQL users, enabling them to:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Derive valuable insights from data without requiring extensive technical knowledge&lt;/li&gt;&lt;li&gt;Automate the retrieval augmented generation process&lt;/li&gt;&lt;li&gt;Utilize features like synthetic data generation, chat history support, and more from a SQL interface&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The DBMS_CLOUD_AI package facilitates integration with user-specified LLMs, enabling natural language to SQL generation. This package provides an augmented prompt to the LLM, containing relevant database schema metadata, to generate, run, and explain SQL queries based on natural language prompts.&lt;/p&gt;&lt;p&gt;At the moment, following models are supported by Select AI:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;meta.llama-3.1-70b-instruct (default)&lt;/li&gt;&lt;li&gt;meta.llama-3.1-405b-instruct&lt;/li&gt;&lt;li&gt;meta.llama-3.2-90b-vision-instruct&lt;/li&gt;&lt;li&gt;cohere.command-r-16k (deprecated)&lt;/li&gt;&lt;li&gt;cohere.command–r-plus (deprecated)&lt;/li&gt;&lt;li&gt;cohere.command-r-08-2024&lt;/li&gt;&lt;li&gt;cohere.command-r-plus-08-2024&lt;/li&gt;&lt;li&gt;GPT-4o&lt;/li&gt;&lt;li&gt;GPT-4&lt;/li&gt;&lt;li&gt;GPT-4 Turbo with Vision&lt;/li&gt;&lt;li&gt;GPT-3.5-Turbo&lt;/li&gt;&lt;li&gt;command (default)&lt;/li&gt;&lt;li&gt;command-nightly (experimental)&lt;/li&gt;&lt;li&gt;command-r&lt;/li&gt;&lt;li&gt;command-r-plus&lt;/li&gt;&lt;li&gt;command-light&lt;/li&gt;&lt;li&gt;Mixtral-8x7B-Instruct-v0.1 (default)&lt;/li&gt;&lt;li&gt;Meta-Llama-3-70B-Instruct&lt;/li&gt;&lt;li&gt;Qwen1.5-1.8B&lt;/li&gt;&lt;li&gt;claude-3-5-sonnet-20240620 (default)&lt;/li&gt;&lt;li&gt;claude-3-opus-20240229&lt;/li&gt;&lt;li&gt;claude-3-sonnet-20240229&lt;/li&gt;&lt;li&gt;gpt-3.5-turbo (default)&lt;/li&gt;&lt;li&gt;gpt-4o&lt;/li&gt;&lt;li&gt;gpt-4o-mini&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/3101341896412031720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/3101341896412031720' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/3101341896412031720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/3101341896412031720'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2024/12/oracle-select-ai-and-dbmscloudai-in.html' title='Oracle Select AI and DBMS_CLOUD_AI in Simple Words'/><author><name>Fahd Mirza Chughtai</name><uri>http://www.blogger.com/profile/03083861859898991937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-1824451749789230169</id><published>2024-12-29T23:50:00.000-08:00</published><updated>2024-12-29T23:50:05.935-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="kokoro"/><category scheme="http://www.blogger.com/atom/ns#" term="tts"/><title type='text'>Install Kokoro TTS Model Locally</title><content type='html'>&lt;p&gt;&amp;nbsp;This video locally installs Kokoro which is a frontier TTS model for its size of 82 million parameters. It can be run anywhere.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;363&quot; src=&quot;https://www.youtube.com/embed/up-ZG35uuvQ&quot; width=&quot;437&quot; youtube-src-id=&quot;up-ZG35uuvQ&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;!git clone https://huggingface.co/hexgrad/Kokoro-82M&lt;/div&gt;&lt;div&gt;%cd Kokoro-82M&lt;/div&gt;&lt;br /&gt;&lt;div&gt;!apt-get -qq -y install espeak-ng &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;/div&gt;&lt;div&gt;!pip install -q phonemizer torch transformers scipy munch&lt;/div&gt;&lt;br /&gt;&lt;div&gt;from models import build_model&lt;/div&gt;&lt;div&gt;import torch&lt;/div&gt;&lt;div&gt;device = &#39;cuda&#39; if torch.cuda.is_available() else &#39;cpu&#39;&lt;/div&gt;&lt;div&gt;MODEL = build_model(&#39;kokoro-v0_19.pth&#39;, device)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;VOICE_NAME = [&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &#39;af&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &#39;af_bella&#39;, &#39;af_sarah&#39;, &#39;am_adam&#39;, &#39;am_michael&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &#39;bf_emma&#39;, &#39;bf_isabella&#39;, &#39;bm_george&#39;, &#39;bm_lewis&#39;,][0]&lt;/div&gt;&lt;br /&gt;&lt;div&gt;VOICEPACK = torch.load(f&#39;voices/{VOICE_NAME}.pt&#39;, weights_only=True).to(device)&lt;/div&gt;&lt;div&gt;print(f&#39;Loaded voice: {VOICE_NAME}&#39;)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;from kokoro import generate&lt;/div&gt;&lt;div&gt;text = &quot;How could I know? It&#39;s an unanswerable question. Like asking an unborn child if they&#39;ll lead a good life. They haven&#39;t even been born.&quot;&lt;/div&gt;&lt;div&gt;audio, out_ps = generate(MODEL, text, VOICEPACK, lang=VOICE_NAME[&lt;span style=&quot;color: #ce9178;&quot;&gt;0&lt;/span&gt;])&lt;/div&gt;&lt;br /&gt;&lt;div&gt;from IPython.display import display, Audio&lt;/div&gt;&lt;div&gt;display(Audio(data=audio, rate=24000, autoplay=True))&lt;/div&gt;&lt;div&gt;print(out_ps)&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/1824451749789230169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/1824451749789230169' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/1824451749789230169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/1824451749789230169'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2024/12/install-kokoro-tts-model-locally.html' title='Install Kokoro TTS Model Locally'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/up-ZG35uuvQ/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-2470595993919636740</id><published>2024-12-20T17:22:00.000-08:00</published><updated>2024-12-20T17:22:25.118-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="magicquil"/><category scheme="http://www.blogger.com/atom/ns#" term="magicquill"/><title type='text'>MagicQuill Installation on Windows, Linux, Mac for AI Image Editing for Free</title><content type='html'>&lt;p&gt;&amp;nbsp;This video is an easy step-by-step tutorial to install MagicQuill locally on Linux, Windows, Mac.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;365&quot; src=&quot;https://www.youtube.com/embed/R0XuVqMSHYk&quot; width=&quot;439&quot; youtube-src-id=&quot;R0XuVqMSHYk&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;conda create -n ai python=3.10 -y &amp;amp;&amp;amp; conda activate ai&lt;/div&gt;&lt;br /&gt;&lt;div&gt;git clone --recursive https://github.com/magic-quill/MagicQuill.git &amp;amp;&amp;amp; cd MagicQuill&lt;/div&gt;&lt;br /&gt;&lt;div&gt;wget -O models.zip &quot;https://hkustconnect-my.sharepoint.com/:u:/g/personal/zliucz_connect_ust_hk/EWlGF0WfawJIrJ1Hn85_-3gB0MtwImAnYeWXuleVQcukMg?e=Gcjugg&amp;amp;download=1&quot;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;unzip models.zip&lt;/div&gt;&lt;br /&gt;&lt;div&gt;pip install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu118&lt;/div&gt;&lt;br /&gt;&lt;div&gt;pip install gradio_magicquill-0.0.1-py3-none-any.whl&lt;/div&gt;&lt;br /&gt;&lt;div&gt;cp -f pyproject.toml MagicQuill/LLaVA/&lt;/div&gt;&lt;div&gt;pip install -e MagicQuill/LLaVA/&lt;/div&gt;&lt;br /&gt;&lt;div&gt;pip install -r requirements.txt&lt;/div&gt;&lt;br /&gt;&lt;div&gt;python gradio_run.py&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/2470595993919636740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/2470595993919636740' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/2470595993919636740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/2470595993919636740'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2024/12/magicquill-installation-on-windows.html' title='MagicQuill Installation on Windows, Linux, Mac for AI Image Editing for Free'/><author><name>Fahd Mirza Chughtai</name><uri>http://www.blogger.com/profile/03083861859898991937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/R0XuVqMSHYk/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-6159977008895670041</id><published>2024-12-17T15:27:00.000-08:00</published><updated>2024-12-17T15:27:40.179-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Mobile Authenticator"/><title type='text'>SOLVED - Cannot Log in Oracle cloud with 2FA after Phone Change with Oracle Mobile Authenticator</title><content type='html'>&lt;p&gt;&amp;nbsp;I have been logging in to Oracle cloud using multi-factor authentication using 2FA with Oracle Mobile Authenticator and it was going fine until I had to change my phone. Both of my phones are android and I THOUGHT that I will simply migrate the apps and keep&amp;nbsp; using the accounts in my Oracle mobile authenticator same way, but it seems that after migration I lost all the accounts.&amp;nbsp;&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;p&gt;Multi-Factor Authentication (MFA) is a security process that requires a user to provide two or more authentication factors to access a system, network, or application. Two-Factor Authentication (2FA) is a type of Multi-Factor Authentication that requires a user to provide two authentication factors:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Something you know (password, PIN)&lt;/li&gt;&lt;li&gt;Something you have (smartphone, token, or a one-time password sent via SMS or authenticator app)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;So I was using 2FA with this Oracle Mobile Authenticator. I tried with my older codes , QR codes, the password, PIN and stuff but nothing worked. No matter, what I tried I simply couldn&#39;t log in to Oracle Cloud since the page asked me for a code generated by the authenticator.&lt;/p&gt;&lt;p&gt;Eventually following is the only way I could find to resolve this issue:&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;i&gt;I talked in Oracle live chat, and they asked me to find an engineer to send me a bypass code.&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;If you don&#39;t know what Oracle Mobile Authenticator app is then as per docs:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://docs.oracle.com/en-us/iaas/Content/Identity/mobileauthapp/download-mobile-authenticator-app.htm&quot;&gt;Oracle Mobile Authenticator&lt;/a&gt; enables you to securely verify your identity by using your mobile device as a authentication factor. The app generates one-time passwords for login. Or it can receive notifications for login, which can be approved with a simple tap. When this authentication is used on top of username-password, it adds an additional layer of security that is essential for today&#39;s online applications.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Features:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Generate one-time passwords even when the device is offline&lt;/li&gt;&lt;li&gt;Push Notification based approval&lt;/li&gt;&lt;li&gt;App PIN for app protection&lt;/li&gt;&lt;li&gt;Set up via QR code, Config URL, or by entering key manually&lt;/li&gt;&lt;li&gt;Multiple account support&lt;/li&gt;&lt;li&gt;Generate OTP for other applications that make use of One-Time Password as per RFC 6238&lt;/li&gt;&lt;li&gt;Generate one-time passwords even when the device is offline&lt;/li&gt;&lt;li&gt;Push Notification based approval&lt;/li&gt;&lt;li&gt;App PIN for app protection&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I hope this helps.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/6159977008895670041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/6159977008895670041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/6159977008895670041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/6159977008895670041'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2024/12/solved-cannot-log-in-oracle-cloud-with.html' title='SOLVED - Cannot Log in Oracle cloud with 2FA after Phone Change with Oracle Mobile Authenticator'/><author><name>Fahd Mirza</name><uri>http://www.blogger.com/profile/14722451950835849728</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfhUV5TmW-L2vC0y9_tOUEON-rPEVJS5jXJTClrk7hZtjtq0z7wrmP-lrSaqv-5Hs4zOJsHmSigxLJvY5mfMKPcFqsvv-pYz0beUZn2L8g_0Ygs4Bx1Inj7AJ_DvhSf08/s220/fahdgooglephoto.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3496259157130184660.post-1629384397067722500</id><published>2024-12-16T23:31:00.000-08:00</published><updated>2024-12-16T23:31:48.722-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chatgpt"/><category scheme="http://www.blogger.com/atom/ns#" term="oracle digital assistant"/><title type='text'>How-To Integrate ChatGPT with Oracle Digital Assistant</title><content type='html'>&lt;p&gt;&amp;nbsp;Oracle Digital Assistant (ODA) provides a comprehensive platform for creating conversational interfaces. This article will guide you through integrating ChatGPT with ODA using the bots-node-sdk and openai libraries.&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;b&gt;Prerequisites:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Oracle Digital Assistant instance&lt;/li&gt;&lt;li&gt;ChatGPT API key&lt;/li&gt;&lt;li&gt;Node.js environment&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Configuration:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Create a new file named services.js and add the following code:&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;OracleBot&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;require&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;@oracle/bots-node-sdk&#39;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; { &lt;span style=&quot;color: #4fc1ff;&quot;&gt;WebhookClient&lt;/span&gt;, &lt;span style=&quot;color: #4fc1ff;&quot;&gt;WebhookEvent&lt;/span&gt; } &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;OracleBot&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;Middleware&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;express&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;require&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;express&#39;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; { &lt;span style=&quot;color: #4fc1ff;&quot;&gt;Configuration&lt;/span&gt;, &lt;span style=&quot;color: #4fc1ff;&quot;&gt;OpenIApi&lt;/span&gt; } &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;require&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;openai&quot;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;configuration&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;Configuration&lt;/span&gt;({&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;apiKey&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;YOUR_CHATGPT_API_KEY&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;});&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;openai&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;OpenIApi&lt;/span&gt;(&lt;span style=&quot;color: #4fc1ff;&quot;&gt;configuration&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;textGeneration&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;async&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;prompt&lt;/span&gt;) &lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;try&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;response&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;openai&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;createCompletion&lt;/span&gt;({&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;model&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;text-davinci-003&#39;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;prompt&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;`Human: &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;prompt&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #d7ba7d;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;AI: `&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;temperature&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;0.9&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;max_tokens&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;500&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;top_p&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;frequency_penalty&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;presence_penalty&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;0.6&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;stop&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; [&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;Human:&#39;&lt;/span&gt;, &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;AI:&#39;&lt;/span&gt;],&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; });&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;status&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;choices&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;].&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;`&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; };&lt;/div&gt;&lt;div&gt;&amp;nbsp; } &lt;span style=&quot;color: #c586c0;&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;error&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;status&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;&#39;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; };&lt;/div&gt;&lt;div&gt;&amp;nbsp; }&lt;/div&gt;&lt;div&gt;};&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;module&lt;/span&gt;.&lt;span style=&quot;color: #4ec9b0;&quot;&gt;exports&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;app&lt;/span&gt;) &lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;logger&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #6a9955;&quot;&gt;// Initialize Oracle Digital Assistant&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;OracleBot&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;init&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;app&lt;/span&gt;, {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;logger&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; });&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #6a9955;&quot;&gt;// Set up webhook integration&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;webhook&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;WebhookClient&lt;/span&gt;({&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;channel&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;YOUR_ODA_WEBHOOK_URL&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;secret&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;YOUR_ODA_WEBHOOK_SECRET&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; },&lt;/div&gt;&lt;div&gt;&amp;nbsp; });&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #6a9955;&quot;&gt;// Handle incoming messages&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;webhook&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;on&lt;/span&gt;(&lt;span style=&quot;color: #4fc1ff;&quot;&gt;WebhookEvent&lt;/span&gt;.&lt;span style=&quot;color: #4fc1ff;&quot;&gt;MESSAGE_RECEIVED&lt;/span&gt;, (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;message&lt;/span&gt;) &lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;action&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;message&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;queryResult&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;action&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;queryText&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;message&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;queryResult&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;queryText&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #4fc1ff;&quot;&gt;action&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;===&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;input.unknown&#39;&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;textGeneration&lt;/span&gt;(&lt;span style=&quot;color: #4fc1ff;&quot;&gt;queryText&lt;/span&gt;).&lt;span style=&quot;color: #dcdcaa;&quot;&gt;then&lt;/span&gt;((&lt;span style=&quot;color: #9cdcfe;&quot;&gt;result&lt;/span&gt;) &lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;result&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;status&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;===&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;res&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;send&lt;/span&gt;({&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fulfillmentMessages&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; [&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; [&lt;span style=&quot;color: #9cdcfe;&quot;&gt;result&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt;],&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;span style=&quot;color: #c586c0;&quot;&gt;else&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;res&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;send&lt;/span&gt;({&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fulfillmentMessages&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; [&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; [&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Sorry, I&#39;m not able to help with that.&quot;&lt;/span&gt;],&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; } &lt;span style=&quot;color: #c586c0;&quot;&gt;else&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;res&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;send&lt;/span&gt;({&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fulfillmentMessages&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; [&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; [&lt;span style=&quot;color: #ce9178;&quot;&gt;`No handler for action &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;action&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;`&lt;/span&gt;],&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; });&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #6a9955;&quot;&gt;// Set up endpoint for incoming messages&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;app&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;post&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;/bot/message&#39;&lt;/span&gt;, (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;req&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;res&lt;/span&gt;) &lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;message&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;req&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;body&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;webhook&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;send&lt;/span&gt;(&lt;span style=&quot;color: #4fc1ff;&quot;&gt;message&lt;/span&gt;).&lt;span style=&quot;color: #dcdcaa;&quot;&gt;then&lt;/span&gt;(() &lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;res&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;send&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;ok&#39;&lt;/span&gt;));&lt;/div&gt;&lt;div&gt;&amp;nbsp; });&lt;/div&gt;&lt;div&gt;};&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Replace YOUR_CHATGPT_API_KEY with your actual ChatGPT API key.&lt;/li&gt;&lt;li&gt;Replace YOUR_ODA_WEBHOOK_URL and YOUR_ODA_WEBHOOK_SECRET with your actual Oracle Digital Assistant webhook URL and secret.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Dialog Flow Integration&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To integrate the ChatGPT service with your Oracle Digital Assistant dialog flow, follow these steps:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create a new intent in your dialog flow with the action input.unknown.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Add a new fulfillment to the intent with the following settings:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Fulfillment type: Webhook&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Webhook URL: YOUR_APP_URL/bot/message (replace with your actual app URL)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;HTTP method: POST&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Save and deploy your dialog flow.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Testing&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Test your integration by sending a message to your Oracle Digital Assistant instance. The message should be routed to the ChatGPT service, which will generate a response. The response will then be sent back to the user.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note: Make sure to replace the placeholder values with your actual credentials and URLs.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.fahdmirza.com/feeds/1629384397067722500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3496259157130184660/1629384397067722500' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/1629384397067722500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3496259157130184660/posts/default/1629384397067722500'/><link rel='alternate' type='text/html' href='http://www.fahdmirza.com/2024/12/how-to-integrate-chatgpt-with-oracle.html' title='How-To Integrate ChatGPT with Oracle Digital Assistant'/><author><name>Fahd Mirza Chughtai</name><uri>http://www.blogger.com/profile/03083861859898991937</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>