
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
io.github.eslamwael74.speechtotextkit:speechToText
Advanced tools
A Kotlin Multiplatform library for speech-to-text functionality.
SpeechToTextKit is a Kotlin Multiplatform library that provides a simple and unified API for speech-to-text functionality across multiple platforms: Android, iOS, Desktop (JVM), and Web (Wasm).
rememberSpeechToText()
in progress...
Add the following to your settings.gradle.kts:
dependencyResolutionManagement {
repositories {
// ...
maven { url = uri("https://jitpack.io") }
}
}
Then add the dependency to your module's build.gradle.kts:
dependencies {
// Core library
implementation("com.github.eslamwael74.speechtotextkit:speechToText:1.0.0")
// Optional: Compose UI components
implementation("com.github.eslamwael74.speechtotextkit:speechToTextCompose:1.0.0")
}
There are currently two ways to use this library:
import androidx.compose.material.Button
import androidx.compose.material.Text
import androidx.compose.runtime.*
import com.eslamwael74.speechtotextcompose.rememberSpeechToText
@Composable
fun SpeechRecognitionScreen() {
var recognizedText by remember { mutableStateOf("") }
val speechRecognizer = rememberSpeechToText()
var isListening by remember { mutableStateOf(false) }
LaunchedEffect(Unit) {
speechRecognizer.results.collect { result ->
recognizedText = result.text
}
}
Column(modifier = Modifier.fillMaxSize().padding(16.dp)) {
Text(
text = recognizedText.ifEmpty { "Tap the button and speak" },
modifier = Modifier.weight(1f)
)
Button(onClick = {
if (isListening) {
// Stop listening
speechRecognizer.stopListening()
isListening = false
} else {
// Start listening
speechRecognizer.startListening()
isListening = true
}
}) {
Text(if (isListening) "Stop Listening" else "Start Listening")
}
}
}
import com.eslamwael74.speechtotext.SpeechRecognizer
import com.eslamwael74.speechtotext.SpeechRecognizerFactory
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
// Using dependency injection
class YourViewModel(
private val speechRecognizer: SpeechRecognizer
) {
init {
// Listen for speech recognition results
speechRecognizer.results.onEach { result ->
// Handle result
println("Recognized text: ${result.text}")
}.launchIn(viewModelScope)
// Monitor state changes
speechRecognizer.state.onEach { state ->
// Handle state changes
println("Recognition state: $state")
}.launchIn(viewModelScope)
}
fun startListening() {
viewModelScope.launch {
speechRecognizer.startListening()
}
}
fun stopListening() {
viewModelScope.launch {
speechRecognizer.stopListening()
}
}
fun cleanup() {
speechRecognizer.destroy()
}
}
// Example of factory/provider to create the SpeechRecognizer
class SpeechRecognizerProvider(
private val applicationContext: Context
) {
fun provideSpeechRecognizer(): SpeechRecognizer {
return SpeechRecognizerFactory(applicationContext).createSpeechRecognizer()
}
}
// Usage with Manual DI
class YourActivity : AppCompatActivity() {
private val speechRecognizerProvider by lazy {
SpeechRecognizerProvider(applicationContext)
}
private val viewModel by viewModels {
viewModelFactory {
YourViewModel(speechRecognizerProvider.provideSpeechRecognizer())
}
}
}
// Or with Hilt/Dagger
@Module
@InstallIn(SingletonComponent::class)
object SpeechModule {
@Provides
@Singleton
fun provideSpeechRecognizer(@ApplicationContext context: Context): SpeechRecognizer {
return SpeechRecognizerFactory(context).createSpeechRecognizer()
}
}
Add the following permission to your AndroidManifest.xml:
<uses-permission android:name="android.permission.RECORD_AUDIO" />
You'll also need to request this permission at runtime.
Add the following to your Info.plist:
<key>NSMicrophoneUsageDescription</key>
<string>This app needs access to your microphone for speech recognition</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>This app uses speech recognition to convert your speech to text</string>
The following features are planned but not yet implemented:
Check out the included example app in the /example directory for a complete implementation of SpeechToTextKit.
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)Distributed under the Apache 2.0 License. See LICENSE for more information.
Eslam Wael - @eslamwael74
Project Link: https://github.com/eslamwael74/speechtotextkit
FAQs
Unknown package
We found that io.github.eslamwael74.speechtotextkit:speechToText demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.