Aspose.OCR-Cloud 23.11.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Aspose.OCR-Cloud --version 23.11.0
NuGet\Install-Package Aspose.OCR-Cloud -Version 23.11.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aspose.OCR-Cloud" Version="23.11.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Aspose.OCR-Cloud --version 23.11.0
#r "nuget: Aspose.OCR-Cloud, 23.11.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Aspose.OCR-Cloud as a Cake Addin
#addin nuget:?package=Aspose.OCR-Cloud&version=23.11.0

// Install Aspose.OCR-Cloud as a Cake Tool
#tool nuget:?package=Aspose.OCR-Cloud&version=23.11.0

<img src="docs/Resources/heading.png">

Aspose.OCR Cloud .NET SDK 23.11.0

License Nuget

Aspose.OCR Cloud is an optical character recognition as a service. With it, you can easily add OCR functionality to almost any device or platform, including netbooks, mini PCs, or even entry-level smartphones.

Our engine can read text from images, photos, screenshots and scanned PDFs in a wide variety of European, Cyrillic and Oriental fonts, returning results in the most popular document formats. Powerful built-in image processing filters based on neural networks automatically correct skewed and distorted images, automatically remove dirt, smudges, scratches, glare and other image defects that can affect recognition accuracy. To further improve the results, Aspose.OCR Cloud has a built-in spell checker that automatically replaces misspelled words and saves you the trouble of manually correcting the recognition results.

Even the complex recognition tasks can be done with a couple of API calls. To make interacting with Aspose.OCR Cloud services from .NET applications even easier, we provide the software development kit (SDK) for .NET. It handles all the routine operations such as establishing connections, sending API requests, and parsing responses, wrapping all these tasks into a few simple classes.

Aspose.OCR Cloud SDK for .NET is open source under the MIT license. You can freely use it for any projects, including commercial and proprietary applications, as well as modify any part of its code.

Try Online

Image to Text Image to Searchable PDF PDF OCR Receipt Scanner
Scan Image Image to Searchable PDF PDF OCR Receipt Scanner

Get started

Aspose.OCR Cloud is an on-demand service with a free tier. In order to use Aspose.OCR Cloud service, you must create an account at Aspose Cloud API:

  1. Go to https://dashboard.aspose.cloud/
  2. If you are already registered with Aspose, sign in with your user name and password.
    Otherwise, click Don’t have an account? Sign Up link and create a new account.
  3. Check out more information about available subscription plans and a free tier limits.

Aspose values your privacy and takes technical, security and organizational measures to protect your data from unauthorized use, accidental loss or disclosure. Read our Privacy Policy and Terms of Service for details.

Authorization

Aspose.OCR Cloud follows industry standards and best practices to keep your data secure. All communication with OCR REST API is done using JWT authentication, which provides an open-standard, highly secure way to exchange information. Time-limited JWT tokens are generated using Client ID and Client Secret credentials that are specific for each application. To obtain the credentials:

  1. Sign in to Aspose Cloud API Dashboard.

  2. Go to Applications page.

  3. Click Create New Application button.

  4. Give the application an easily recognizable name so it can be quickly found in a long list, and provide an optional detailed description.

  5. Create the cloud storage by clicking the plus icon and following the required steps. You can also reuse existing storage, if available.
    Aspose.OCR Cloud uses its own internal storage, so you can provide the bare minimum storage options:

    • Type: Internal storage
    • Storage name: Any name you like
    • Storage mode: Retain files for 24 hours
  6. Click Save button.

  7. Click the newly created application and copy the values from Client Id and Client Secret fields.

  8. Pass in the values from the Client ID and Client Secret fields when initializing the required OCR API.

Running demo

  1. Check out the SDK or install it from NuGet.
  2. Open Examples demo solution.
  3. Provide your Client ID and Client Secret (see Authorization above).
  4. Run the project.

<p align="center"> <a title="Download ZIP" href="https://github.com/aspose-ocr-cloud/aspose-ocr-cloud-dotnet/archive/master.zip"> <img src="Docs/Resources/download.png" /> </a> </p>

What was changed in version 23.11.0

A summary of recent changes, enhancements and bug fixes in Aspose.OCR Cloud SDK for .NET 23.11.0 release:

Key Summary Category
OCR‑3560 Added an API for extracting structured information from scanned invoices. New feature
OCR‑3722 Added a free API for evaluating text-to-speech conversion that works without authorization.<br />Some restrictions apply. See below for details. New feature
OCR‑3171 Added an API for getting task status without downloading a full recognition result. Enhancement

REST API changes: https://releases.aspose.cloud/ocr/release-notes/2023/aspose-ocr-cloud-23-11-0-release-notes/

Public API changes and backwards compatibility

This section lists all public API changes introduced in Aspose.OCR Cloud SDK for .NET 23.11.0 that may affect the code of existing applications.

Added public APIs:

The following public APIs have been introduced in this release:

Extracting structured information from invoice

The following new classes have been added for extracting structured information in JSON format from scanned or photographed invoices:

Class Description
RecognizeAndParseInvoiceApi Invoice processing API.
OCRSettingsRecognizeAndParseInvoice Invoice processing settings.
OCRRecognizeAndParseInvoiceBody Invoice processing request body.

Learn more...

Text-to-speech evaluation

The following new classes have been added:

Class Description
ConvertTextToSpeechTrialApi Evaluation text-to-speech conversion API (without authorization).

The evaluation mode has some limitations:

  • 10 requests per day from a single IP address.
  • The text size must not exceed 500 characters, including spaces and punctuation.
  • The phrase "Please authenticate to the API to remove this message" is inserted at a random position within the generated audio.

Learn more...

Quickly fetch processing status

The following new classes have been added:

Class Description
UtilitiesApi Universal API for various management and monitoring purposes.

Learn more...

Updated public APIs:

No changes

Removed public APIs:

No changes.

Examples

The examples below illustrate the changes introduced in version 23.11.0:

Extract structured data from the invoice

using Aspose.OCR.Cloud.SDK.Api;
using Aspose.OCR.Cloud.SDK.Model;
using System.Text;

namespace ExampleDotNet60v50.APIExamples
{
	public static class RecognizeAndParseInvoiceExample
	{
    	public static void Run(string clientId, string clientSecret)
    	{
        	try
        	{
            	string imageFileName = "samples/invoice_english_01.jpg";

            	Console.WriteLine($"Sending sample invoice ({imageFileName}) for processing...\n");

            	RecognizeAndParseInvoiceApi apiInstance = new RecognizeAndParseInvoiceApi(clientId, clientSecret);
            	var requestBody = new OCRRecognizeAndParseInvoiceBody(
                    	image: File.ReadAllBytes(imageFileName),
                    	settings: new OCRSettingsRecognizeAndParseInvoice(resultType: ResultType.Text));
            	string taskId = apiInstance.PostRecognizeAndParseInvoice(requestBody);
            	Console.WriteLine($"File successfully sent. Your credentials accepted. Your task ID is {taskId}\nTaking a while before request result...");
            	Thread.Sleep(10000);
            	var response = apiInstance.GetRecognizeAndParseInvoice(taskId);
            	Console.WriteLine($"Respose received with status {response.TaskStatus.Value} \n\n" +
                	$" Your results:\n\n");
            	response.Results.ForEach(res => Console.WriteLine(Encoding.UTF8.GetString(res.Data)));
        	}
        	catch (Exception ex)
        	{
            	Console.WriteLine(ex.ToString());
        	}
    	}
	}
}

Convert text to speech in free (evaluation) mode

using Aspose.OCR.Cloud.SDK.Api;
using Aspose.OCR.Cloud.SDK.Model;

namespace ExampleDotNet60v50.APIExamples
{
	public static class TextToSpeechTrialExample
	{
    	public static void TryConvertTextToSpeechTrialApi()
    	{
        	try
        	{
            	string sampleText = "This is the sample text";

            	ConvertTextToSpeechTrialApi apiInstance = new ConvertTextToSpeechTrialApi();

            	var settings = new TTSBody(
                    	text: sampleText,
                    	settings: new TTSSettings(
                        	language: LanguageTTS.English,
                        	resultType: ResultTypeTTS.Wav));

            	var taskId = apiInstance.PostConvertTextToSpeechTrial(settings);
            	Console.WriteLine($"Text sent for TTS. Your credentials accepted. Your task ID is {taskId}");

            	Console.WriteLine($"Requesting results for task {taskId} ...");
            	var result = apiInstance.GetConvertTextToSpeechTrial(taskId);

            	byte[] soundFile = result.Results[0].Data;
            	string extension = result.Results[0].Type switch
            	{
                	"WavFile" => "wav",
                	_ => "wav"
            	};

            	Console.WriteLine($"Respose received with status {result.TaskStatus.Value} \n\n" +
                	$" Your results will be saved to results\\{result.Id}.{extension}:\n\n");
            	Directory.CreateDirectory("results");
            	File.WriteAllBytes($"results/{result.Id}.{extension}", soundFile);

            	Console.WriteLine("\nPress any key to continue");
            	Console.ReadKey();
        	}
        	catch (Exception ex)
        	{
            	Console.WriteLine(ex.ToString());
            	Console.WriteLine("\nPress any key to continue");
            	Console.ReadKey();
        	}
    	}
	}
}

Fetch the status of the request

namespace ExampleDotNet60v50.APIExamples
{
	public static class UtilitiesApiExample
	{
    	public static void TryUtilitiesApi(string clientId, string clientSecret)
    	{
        	try
        	{
            	string taskId = "00000000-0000-0000-0000-000000000000";

            	UtilitiesApi utilitieseApi = new UtilitiesApi();

            	Console.WriteLine($"Requesting task status for task {taskId} ...");
            	var result = utilitieseApi.GetTaskStatus(taskId);
            	Console.WriteLine($"Respose received with status {result.TaskStatus.Value} \n\n ");

            	Console.WriteLine("\nPress any key to continue");
            	Console.ReadKey();
        	}
        	catch (Exception ex)
        	{
            	Console.WriteLine(ex.ToString());
            	Console.WriteLine("\nPress any key to continue");
            	Console.ReadKey();
        	}
    	}
	}
}

Other Aspose.OCR Cloud SDKs

Resources

Find more information on Aspose.OCR Cloud and get professional help:

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
23.12.0 224 12/21/2023
23.11.0 212 11/24/2023
23.6.0 195 7/3/2023
23.5.0 145 5/22/2023
22.12.0 448 12/15/2022
22.5.1 3,791 5/17/2022
22.5.0 438 5/17/2022
21.12.2 337 12/28/2021
21.12.1 2,904 12/14/2021
21.12.0 317 12/7/2021
21.9.0 2,362 9/1/2021
21.8.0 739 8/10/2021
21.6.0 1,739 6/25/2021
21.5.0 817 5/7/2021
21.4.0 462 4/11/2021
21.3.1 571 3/16/2021
20.3.0 646 4/14/2020
1.0.4 1,148 8/14/2017
1.0.3 1,015 1/6/2017
1.0.2 1,001 11/2/2016
1.0.1 979 10/20/2016
1.0.0 1,562 2/26/2016