Community Spring Boot and Spring AI building blocks for conversations between humans and artificial intelligence.
As a Spring Boot and Spring AI developer, I want to consume libraries that make it convenient to add capabilities to my application(s) as for the following
Use-cases:
- Interfaces and abstract implementations for conversations (speech to text, inquiry, and text to speech)
- Support for speech to text using
- Support for text to speech using
- Sample converse implementations
Start with:
- A Github account
- One or more of a(n)
- An LLM provider
- e.g., HuggingFace, Gemini, Ollama, or OpenAI
- Git CLI (2.43.0 or better)
- Github CLI (2.65.0 or better)
- httpie CLI (3.2.2 or better)
- Java SDK (21 or better)
- Maven (3.9.9 or better)
- an LLM provider account (if using public cloud or commercially hosted models)
with Git CLI
git clone https://github.com/pacphi/spring-ai-converse
with Github CLI
gh repo clone pacphi/spring-ai-converse
Open a terminal shell, then execute:
cd spring-ai-converse
mvn clean install
If you want to incorporate any of the starters as dependencies in your own projects, you would:
Maven
<dependency>
<groupId>me.pacphi</groupId>
<artifactId>spring-boot-elevenlabs-starter</artifactId>
<version>{release-version}</version>
</dependency>
Gradle
implementation 'me.pacphi:spring-boot-elevenlabs-starter:{release-version}'
Replace occurrences of {release-version} above with a valid artifact release version number
Following Spring Boot conventions, you would add a stanza like this to your:
application.properties
spring.elevenlabs.enabled=true
spring.elevenlabs.api-key=${ELEVENLABS_API_KEY:}
# Consult https://api.elevenlabs.io/v1/voices for a list of all the available voices
spring.elevenlabs.defaults.voiceId=Xb7hH8MSUJpSbSDYk0k2
application.yml
spring:
elevenlabs:
enabled: true
api-key: ${ELEVENLABS_API_KEY:}
defaults:
# Consult https://api.elevenlabs.io/v1/voices for a list of all the available voices
voiceId: Xb7hH8MSUJpSbSDYk0k2
Each dependency you add will require a similar stanza where you will typically: activate the capability, specify an API key (if required), and tune other associated configuration.
Consult the playground module's configuration for alternative
dependencies
and configuration
that are available to add.
Configuration will be found in labeled spring.config.activate.on-profile
sections of the pom.xml file.
There's a sample application in the playground module.