Add support for making Text-To-Speech send regular text messages instead of notices
When speech-to-text/flow-type = `only_transcribe`, the bot will now send text messages by default, not notices. While notice messages may be less desirable with other bots in the room, it's probably a better default for most people who enable "transcribe-only" mode. This is an improvement related to https://github.com/etkecc/baibot/issues/14
This commit is contained in:
@@ -4,7 +4,8 @@ use crate::{
|
||||
PublicIdentifier,
|
||||
},
|
||||
entity::roomconfig::{
|
||||
SpeechToTextFlowType, TextGenerationAutoUsage, TextGenerationPrefixRequirementType,
|
||||
SpeechToTextFlowType, SpeechToTextMessageTypeForNonThreadedOnlyTranscribedMessages,
|
||||
TextGenerationAutoUsage, TextGenerationPrefixRequirementType,
|
||||
TextToSpeechBotMessagesFlowType, TextToSpeechUserMessagesFlowType,
|
||||
},
|
||||
utils::text::block_quote,
|
||||
@@ -269,6 +270,16 @@ pub fn status_speech_to_text_entry_flow_type(
|
||||
format!("- 🪄 Flow type: `{}` ({})\n", value, set_where)
|
||||
}
|
||||
|
||||
pub fn status_speech_to_text_entry_msg_type_for_non_threaded_only_transcribed_messages(
|
||||
value: SpeechToTextMessageTypeForNonThreadedOnlyTranscribedMessages,
|
||||
set_where: &str,
|
||||
) -> String {
|
||||
format!(
|
||||
"- 🪄 Message type for non-threaded only-transcribed messages: `{}` ({})\n",
|
||||
value, set_where
|
||||
)
|
||||
}
|
||||
|
||||
pub fn status_speech_to_text_entry_language(value: Option<String>, set_where: &str) -> String {
|
||||
let formatted = match value {
|
||||
Some(value) => format!("`{}` ({})", value, set_where),
|
||||
|
||||
@@ -200,6 +200,15 @@ pub fn speech_to_text_flow_type_intro() -> &'static str {
|
||||
"Controls how voice messages are handled."
|
||||
}
|
||||
|
||||
pub fn speech_to_text_msg_type_for_non_threaded_only_transcribed_messages_heading() -> &'static str
|
||||
{
|
||||
"🪄 Message Type for non-threaded only-transcribed messages"
|
||||
}
|
||||
|
||||
pub fn speech_to_text_msg_type_for_non_threaded_only_transcribed_messages_intro() -> &'static str {
|
||||
"Controls how the transcribed text of voice messages is sent to the chat when Flow Type = `only_transcribe`."
|
||||
}
|
||||
|
||||
pub fn speech_to_text_language_heading() -> &'static str {
|
||||
"🔤 Language"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user