Skip to main content

A new package that helps users determine the noise level of their environment by analyzing text descriptions. Users input a brief text describing their surroundings, and the package processes this inp

Project description

TextNoise Analyzer

PyPI version License: MIT Downloads LinkedIn

TextNoise Analyzer is a Python package that helps users determine the noise level of their environment by analyzing text descriptions. Users input a brief text describing their surroundings, and the package processes this input to classify the noise level as low, moderate, or high. The structured output provides a clear assessment of the noise level, enabling applications like smart home systems, workplace environment monitoring, or personal safety tools to respond based on user-provided descriptions.

Features

  • Analyze text descriptions to classify noise levels.
  • Supports custom language models (LLMs) from LangChain.
  • Defaults to using ChatLLM7 from LangChain LLM7.
  • Easy integration with popular LLMs like OpenAI, Anthropic, and Google Generative AI.

Installation

You can install the package using pip:

pip install textnoise_analyzer

Usage

Basic Example

from textnoise_analyzer import textnoise_analyzer

user_input = "I can hear the sound of traffic and people talking."
response = textnoise_analyzer(user_input)
print(response)

Using a Custom LLM

You can use a custom LLM from LangChain by passing it to the textnoise_analyzer function.

Using OpenAI

from langchain_openai import ChatOpenAI
from textnoise_analyzer import textnoise_analyzer

llm = ChatOpenAI()
user_input = "I can hear the sound of traffic and people talking."
response = textnoise_analyzer(user_input, llm=llm)
print(response)

Using Anthropic

from langchain_anthropic import ChatAnthropic
from textnoise_analyzer import textnoise_analyzer

llm = ChatAnthropic()
user_input = "I can hear the sound of traffic and people talking."
response = textnoise_analyzer(user_input, llm=llm)
print(response)

Using Google Generative AI

from langchain_google_genai import ChatGoogleGenerativeAI
from textnoise_analyzer import textnoise_analyzer

llm = ChatGoogleGenerativeAI()
user_input = "I can hear the sound of traffic and people talking."
response = textnoise_analyzer(user_input, llm=llm)
print(response)

Parameters

  • user_input (str): The user input text to process.
  • llm (Optional[BaseChatModel]): The LangChain LLM instance to use. If not provided, the default ChatLLM7 will be used.
  • api_key (Optional[str]): The API key for LLM7. If not provided, the environment variable LLM7_API_KEY will be used.

Rate Limits

The default rate limits for LLM7 free tier are sufficient for most use cases of this package. If you need higher rate limits, you can pass your own API key via the api_key parameter or set the environment variable LLM7_API_KEY.

You can get a free API key by registering at LLM7 Token.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License.

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textnoise_analyzer-2025.12.21160634.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

textnoise_analyzer-2025.12.21160634-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file textnoise_analyzer-2025.12.21160634.tar.gz.

File metadata

File hashes

Hashes for textnoise_analyzer-2025.12.21160634.tar.gz
Algorithm Hash digest
SHA256 b663694facbfa4e66c626818490d5217c522f5e1116436673f95941b5a05163f
MD5 4ffb288b22c3178bd4899f9c4df46cf7
BLAKE2b-256 7cfb8020e132060c90fad010f217554558ee79dc81a08eb7d7b090a695758736

See more details on using hashes here.

File details

Details for the file textnoise_analyzer-2025.12.21160634-py3-none-any.whl.

File metadata

File hashes

Hashes for textnoise_analyzer-2025.12.21160634-py3-none-any.whl
Algorithm Hash digest
SHA256 ac64b44e41b88dfbb9897e893795069170f46738f6dffb0871754599ad09c191
MD5 90d6e9ce0ab58eaa9780083e8de453ae
BLAKE2b-256 be75d0f566185bfe2a6a8520f8c75945c09f3f193a86619ded9ec728dd71bdc3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page